Neocon Propaganda Machine

    seeme-client
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.4 • Public • Published

    Unit tests CodeQL

    seeme-client

    A nodejs client library for SMS gateway service provided by seeme.hu

    Prerequisite & Installing

    To use the library you must have an API key that can be generated at the Gateway settings page

    Module can be installed using npm

    npm install seeme-client

    or with yarn

    yarn add seeme-client

    Using the client

    The client can be created by passing the SeeMeClientOptions to the exported createClient function

    Option Default Description
    apiKey required - API client key
    apiHost optional 'https://seeme.hu' API base url - for testing purposes
    apiPath optional '/gateway' Gateway endpoint - for testing purposes
    apiVersion optional '2.0.1' API version string

    Examples with ES6

    const { createClient } = require('../lib');
    
    const options = {
      apiKey: '<your-api-key>'
    };
    
    // Creating the client
    const seeMeClient = createClient(options);
    
    // Getting account balance
    seeMeClient.getBalance()
      .then(console.log)
      .catch(console.error)
    
    // Setting whitelisted IP address
    seeMeClient.setIP('255.255.255')
      .then(console.log)
      .catch(console.error)

    Examples with typescript

    import { createClient, SeeMeClientOptions, SeeMeClient } from 'seeme-client';
    
    const options: SeeMeClientOptions = {
        apiKey: '<your-api-key>'
    }
    
    // Creating the client
    const seeMeClient: SeeMeClient = createClient(options);
    
    // Getting account balance
    const balanceResult = await seeMeClient.getBalance();
    
    // Setting whitelisted IP address
    const setIpResult = await seeMeClient.setIP('255.255.255.255');

    Source

    You can build the project via

    npm run build

    Tests can be ran via

    npm run test

    Disclaimer

    This is not an official client application / sdk for the services provided by seeme.hu.
    Therefore, it is not guaranteed that this client will consume the SMS Gateway api correctly by the time. The library was created based on publicly available documentations at the time of development.

    Install

    npm i seeme-client

    DownloadsWeekly Downloads

    0

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    27 kB

    Total Files

    39

    Last publish

    Collaborators

    • dannystyle