Skip to content

DblTapLabs/Node-Appcelerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

#Appcelerator ACS API Node.js Module A Node.js module that is a simple port of the Appcelerator ACS Javascript SDK to Node

##Setup Install the module

$ npm install appcelerator

Include it in package.json

"dependencies": {
	  "appcelerator": "*"
},

##Usage Here are a couple of example routes for reading and setting a users status

// get a user's statuses
app.get('/status', function(req, res){

	// login details
    var app_key  = '1234';
    var email    = 'ben.edmunds@gmail.com';
    var password = '12345678';

    // require the module
    var appcelerator = require('appcelerator')(app_key, email, password);

    // data to pass to the API
    var data = {'user_id': '4f9eb57a0020440def0056d3'};

    // let's do this
    var output = appcelerator.sendRequest('statuses/query.json', 'GET', data, false, function(res){
      
      console.log(res.body);

    });

  });

  // create a new status
  app.get('/create_status', function(req, res){

    // login details
    var app_key  = '1234';
    var email    = 'ben.edmunds@gmail.com';
    var password = '12345678';

    // require the module
    var appcelerator = require('appcelerator')(app_key, email, password);

    // data to pass to the API
    var data = {'message': 'node.js test message'};

    // let's do this
    var output = appcelerator.sendRequest('statuses/create.json', 'POST', data, false, function(res){
      
      console.log(res.body);

    });

  });

See the Appcelerator documentation for API details.

Module created by Ben Edmunds for DblTap Labs.

About

Appcelerator ACS API package for Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published