npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

uvbconnector

v1.1.2

Published

Az UVBConnector egy Node.js osztály, amely az Utánvét Ellenőr szolgáltatáshoz való kommunikációt valósítja meg. Ez lehetővé teszi az Utánvét Ellenőr API-ján keresztül utánvétes fizetési tranzakciók ellenőrzését és rögzítését.

Downloads

10

Readme

UVBConnector Dokumentáció

Az UVBConnector egy Node.js osztály, amely az Utánvét Ellenőr szolgáltatáshoz való kommunikációt valósítja meg. Ez lehetővé teszi az Utánvét Ellenőr API-ján keresztül utánvétes fizetési tranzakciók ellenőrzését és rögzítését.

Telepítés

A következő lépésekkel telepítheted az UVBConnector-t a projektbe:

  1. Telepítsd a csomagot:
npm install uvbconnector
  1. Másold be az UVBConnector osztályt a projektbe.
const UVBConnector = require('uvbConnector'); // Az elérési útvonalat állítsd be a fájl helyére megfelelően
const publicApiKey = 'PUB_API_KEY'; // helyettesítsd a valós API kulccsal
const privateApiKey = 'PRIV_API_KEY'; // helyettesítsd a valós API kulccsal

const connector = new UVBConnector(publicApiKey, privateApiKey);

Osztály: UVBConnector

Az UVBConnector osztály lehetővé teszi a következő műveletek elvégzését:

Konstruktor

Létrehoz egy új UVBConnector példányt.

const connector = new UVBConnector(publicApiKey, privateApiKey, production);
  • publicApiKey (string): A nyilvános API kulcs az azonosításhoz.
  • privateApiKey (string): A privát API kulcs az azonosításhoz.
  • production (boolean, opcionális): Alapértelmezetten true. Ha false, a sandbox környezetet használja.

Metódusok

get(email) Ellenőrzi az Utánvét Ellenőr szolgáltatáson keresztül a megadott e-mail címet.

try {
    const response = await connector.get('[email protected]', 0.5);
    console.log(response);
} catch (error) {
    console.error(error.message);
}
  • email (string): Az ellenőrizni kívánt e-mail cím.
  • threshold (float): A sikeres ellenőrzéshez szükséges reputáció minimum értéke (küszöbérték). Mi a küszöbérték?

post(email, outcome) Rögzíti az Utánvét Ellenőr szolgáltatáson keresztül a tranzakció kimenetelét.

try {
    const response = await connector.post('[email protected]', 'success');
    console.log(response);
} catch (error) {
    console.error(error.message);
}
  • email (string): Az e-mail cím, amelyhez a tranzakció tartozik.
  • outcome (string): A tranzakció kimenetele (pl. 'success', 'failure').

Példák

Az alábbiakban példák találhatók a UVBConnector osztály használatára:

const UVBConnector = require('UVBConnector');

const publicApiKey = 'PUB_API_KEY';
const privateApiKey = 'PRIV_API_KEY';

const connector = new UVBConnector(publicApiKey, privateApiKey);

(async () => {
    try {
        const response1 = await connector.get('[email protected]');
        console.log(response1);

        const response2 = await connector.post('[email protected]', 'success');
        console.log(response2);
    } catch (error) {
        console.error(error.message);
    }
})();

Következtetés

Az UVBConnector osztály lehetővé teszi az egyszerű kommunikációt az Utánvét Ellenőr API-jával, lehetővé téve az utánvétes fizetési tranzakciók ellenőrzését és rögzítését a projektben.

Készítő

Az UVBConnector osztályt készítette és dokumentálta a drdev.hu csapata.