1.0.4 • Published 3 years ago

seeme-client v1.0.4

Weekly downloads
12
License
MIT
Repository
github
Last release
3 years ago

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

OptionDefaultDescription
apiKeyrequired-API client key
apiHostoptional'https://seeme.hu'API base url - for testing purposes
apiPathoptional'/gateway'Gateway endpoint - for testing purposes
apiVersionoptional'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.

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

0.1.0

4 years ago

1.0.0

4 years ago

0.1.0-0

5 years ago