0.0.15-beta • Published 8 years ago

appsflyio-nodejs-util v0.0.15-beta

Weekly downloads
2
License
https://www.apach...
Repository
github
Last release
8 years ago

About appsfly.io Dev Kit Node Utils

This library contains resources to help communicate with appsfly.io execution server. For all communications with execution server, your application should be registered and a secret key needs to be generated.

Please contact integrations@appsfly.io for your credientials.

Get Started

Application Params

KeyDescription
SECRET_KEYSecret Key is required for encryption. Secret Key should be generated on the Appsfly publisher dashboard
APP_KEYApplication key to identify the publisher instance
EXECUTOR_URLUrl to reach appsfly.io Microservices

NOTE: Above params are needed for checksum generation. Please refer to the methods mention below.

Micro Module Params

KeyDescription
MODULE_HANDLEEach micromodule of a service provider is identified by MODULE_HANDLE
UUIDUniqueID to identify user session

Intent Params

KeyDescription
INTENTIntent is like an endpoint you are accessing to send message
PAYLOADData payload

Integration options

Option 1: SDK

The SDK can be included to handle authorization. There is no need for you to handle checksum generation and verification.

Install

npm i appsflyio-nodejs-util --save

OR

npm install appsflyio-nodejs-util --save

Configuration
var appsflyioUtil = require("appsflyio-nodejs-util");
var app = new appsflyioUtil.AppInstance({executorUrl:"EXECUTOR_URL", secret:"SECRET_KEY", appKey:"APP_KEY"});
Execution
app.exec("MODULE_HANDLE", "INTENT", JSON.parse(PAYLOAD), UUID).then(function(result){
 //Handle Result
}).else(function(error){
 //Handle Error
});

Option 2: API Endpoint

appsfly.io exposes a single API endpoint to access Microservices directly.

Endpoint

EXECUTOR_URL/executor/exec

Method

POST

Headers
HeaderDescription
X-UUIDUUID
X-App-KeyAPP_KEY
X-Module-HandleMODULE_HANDLE
X-ChecksumCHECKSUM. Please go through this gist to generate checksum.
Content-TypeMust be "application/json"
Body

INTENT, PAYLOAD

{
  "intent":"INTENT",
  "data":"PAYLOAD"
 } 
Response

Response format will be dependent on microservice. Please go through this documentation for different microservices.

0.0.15-beta

8 years ago

0.0.14-beta

8 years ago

0.0.13-beta

8 years ago

0.0.11-beta

8 years ago

0.0.10-beta

8 years ago

0.0.9-beta

8 years ago

0.0.8-beta

8 years ago

0.0.7-beta

8 years ago

0.0.6-beta

8 years ago

0.0.5-beta

8 years ago

0.0.4-beta

8 years ago

0.0.3-beta

8 years ago

0.0.2-beta

8 years ago

0.0.1-beta

8 years ago

0.0.1

8 years ago

1.0.0

8 years ago