Giter Club home page Giter Club logo

smsapi-javascript-client's Introduction

SMSAPI JavaScript (node.js) Client

npm version

Klient JavaScript pozwalający na wysyłanie wiadomości SMS, MMS, VMS oraz zarządzanie kontem w serwisie SMSAPI.pl

Instalacja (node.js)

$ npm install smsapi --save

Przykład użycia

var SMSAPI = require('smsapi'),
    smsapi = new SMSAPI();

smsapi.authentication
    .login('username', 'password')
    .then(sendEcoMessage)
    .then(displayResult)
    .catch(displayError);

function sendEcoMessage(){
    return smsapi.message
        .sms()
        .eco()
        .to('605xxxxxx')
        .test()
        .message('My first message!')
        .execute(); // return Promise
}

function displayResult(result){
    console.log(result);
}

function displayError(err){
    console.error(err);
}

Dokumentacja

Dokumentacja interfejsu REST API znajduje się pod adresem http://www.smsapi.pl/rest.

Wszystkie odwołania do API zwracają obiekt Promise zgodny ze standardem Promises/A+. Użyta implementacja: https://github.com/tildeio/rsvp.js

Dostępne operacje

  • message
    • sms
    • mms
    • vms
  • points
    • get
  • sender
    • add
    • delete
    • status
    • default
    • list
  • hlr
    • check
  • user
    • add
    • delete
    • update
    • get
    • list
  • phonebook (deprecated)
    • contact
      • add
      • get
      • update
      • list
      • delete
    • group
      • get
      • add
      • update
      • list
      • delete
  • contacts
    • list
    • add
    • get
    • update
    • delete
    • fields
      • list
      • add
      • update
      • delete
    • groups
      • list
      • add
      • get
      • update
      • delete
      • assignments
        • list
        • add
        • get
        • delete
      • permissions
        • list
        • add
        • get
        • update
        • delete
      • members
        • add
        • get
        • delete

Przykłady

Dodatkowe przykłady użycia dostępnych operacji można znaleźć w testach (./test).

Testy

$ npm install mocha -g
$ npm install .
$ npm test

Licencja

Apache 2.0 License

smsapi-javascript-client's People

Contributors

adrian-olczyk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.