0.0.1 • Published 8 years ago

node-4loop-symphony-api v0.0.1

Weekly downloads
1
License
-
Repository
bitbucket
Last release
8 years ago

4LOOP SYMPHONY API client for node.js

SYMPHONY's unofficial node.js client library for using SYMPHONY Rest API.

Alpha

This library is in Alpha. We will make an effort to support the library, but we reserve the right to make incompatible changes when necessary.

Supported APIs

The full list of supported APIs can be found here. The API endpoints are automatically generated, so if the API is not in the list, it is currently not supported by this API client library.

Questions/problems?

Installation

This library is distributed on npm. In order to add it as a dependency, run the following command:

$ npm install node-4loop-symphony-api --save

Initialize

var symphony = require('node-4loop-symphony-api');

var SYMPHONY_AUTH_KEY = 'ACCESS_TOKEN';
var SYMPHONY_CODE = 'SUBSCRIPTION_ACCESS_CODE';
var SYMPHONY_KEY = 'SUBSCRIPTION_ACCESS_KEY';

// Initialize Symphony Client
var symphony_client = symphony.createClient({
    accessCode: SYMPHONY_CODE,
    accessKey: SYMPHONY_KEY,
    userAuthKey: SYMPHONY_AUTH_KEY
});

Usage

Example: View all country you have on symphony:

var symphony = require('node-4loop-symphony-api');
var SYMPHONY_AUTH_KEY = 'ACCESS_TOKEN';
var SYMPHONY_CODE = 'SUBSCRIPTION_ACCESS_CODE';
var SYMPHONY_KEY = 'SUBSCRIPTION_ACCESS_KEY';

// Initialize Symphony Client
var symphony_client = symphony.createClient({
    accessCode: SYMPHONY_CODE,
    accessKey: SYMPHONY_KEY,
    userAuthKey: SYMPHONY_AUTH_KEY
});

symphony_client.country.viewall(function (err, result) {
    if (err) {
        console.log('Encountered error', err);
      } else {
        console.log(result);
      }
});

Symphony APIs

License

This library is licensed under MIT. Full license text is available in LICENSE.

Contributing

See CONTRIBUTING.

0.0.1

8 years ago