1.0.0 • Published 6 years ago

the-sms-works v1.0.0

Weekly downloads
7
License
(MIT OR BSD-3-Cla...
Repository
-
Last release
6 years ago

the_sms_works_api

TheSmsWorksApi - JavaScript client for the_sms_works_api The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

via npm

npm install the-sms-works --save

You should now be able to require('the-sms-works') in javascript files from the directory you ran the last command above from.

git

This library is hosted at: https://github.com/TheSMSWorks/smsw-nodejs-sdk

you can install it from git via:

    npm install TheSMSWorks/smsw-nodejs-sdk --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instructions then read the quick start guide at: https://thesmsworks.co.uk/developers

Documentation for API Endpoints

All URIs are relative to https://api.thesmsworks.co.uk/v1

ClassMethodHTTP requestDescription
TheSmsWorksApi.AuthApikeySecretGET /auth/getApiKey
TheSmsWorksApi.AuthApiloginPOST /auth/token
TheSmsWorksApi.BatchMessagesApicancelScheduledBatchJobDELETE /batches/schedule/{batchid}
TheSmsWorksApi.BatchMessagesApigetBatchByIdGET /batch/{batchid}
TheSmsWorksApi.BatchMessagesApischeduleBatchPOST /batch/schedule
TheSmsWorksApi.BatchMessagesApisendBatchPOST /batch/send
TheSmsWorksApi.MessagesApicancelScheduledJobDELETE /messages/schedule/{messageid}
TheSmsWorksApi.MessagesApigetInboxMessagesPOST /messages/inbox
TheSmsWorksApi.MessagesApigetMessageByIdGET /messages/{messageid}
TheSmsWorksApi.MessagesApigetMessagesPOST /messages
TheSmsWorksApi.MessagesApischeduleMessagePOST /message/schedule
TheSmsWorksApi.MessagesApisendMessagePOST /message/send
TheSmsWorksApi.UtilsApitestGET /utils/test

Documentation for Models

Documentation for Authorization

JWT

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header