Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

acs-node

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acs-node

Appcelerator ACS SDK for Node.js

  • 0.9.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

acs-node: The sdk of acs for Node.js

ACS SDK for Node.js

You can install it using npm. [sudo] npm install acs-node

Usage

Example 1, do ACS user login:

var ACS = require('acs-node');
ACS.initACS('<App Key>');
function login(req, res) {
	var data = {
		login: req.body.username,
		password: req.body.password
	};
	ACS.Users.login(data, function(data){
		if(data.success) {
			console.log("Successful to login.");
            console.log("UserInfo: " + JSON.stringify(data.users[0], null, 2))
		} else {
            console.log("Error to login: " + data.message);
        }
	}, req, res);
}

Example 2, a generic method show how to operate an ACS user:

var ACS = require('acs-node');
var sdk = ACS.initACS('<App Key>');
function login(req, res) {
	var data = {
		login: req.body.username,
		password: req.body.password
	};
    sdk.rest('users/login.json', 'POST', data, function(data){
        if(data && data.meta) {
            if(data.meta.status == 'ok') {
                console.log("Successful to login.");
                console.log("UserInfo: " + JSON.stringify(data.response.users[0], null, 2))
            } else {
                console.log("Error to login: " + data.meta.message);
            }
        } else {
            console.log("Error to login, try again later.");
        }
    }, req, res);
}

More examples, please look up in the folder examples with the command 'acs run'.

This code is proprietary and confidential. Copyright (c) 2012 by Appcelerator, Inc.

Keywords

FAQs

Package last updated on 19 Nov 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc