Appcelerator Platform SDK
This is a Node module that will allow you to make API requests to the Appcelerator Platform.
$ npm install appc-platform-sdk
var Appc = ;// loginAppcAuth;
Authentication API used for gaining access to the platform.
Login to the Platform. Will validate the user and create a user session which will allow you to make subsequent API calls to the platform while the session is valid.
Switch the active session user's logged in / active organization.
Logout of the Platform session. Will invalidate the session object.
A new Session instance is created on a succesful login. The following properties / functions are available:
|isValid||function||returns true if session is valid|
|invalidate||function||invalid (and logout) session|
|orgs||property||user member orgs|
You cannot create a session and a session is immutable. Once you invalidate a session, it is no longer valid and must not be used again.
User API for interacting with users of the platform.
Find a specific user details.
Organization API for interacting with organizations that a user is a member.
Find all the organizations that the current user has visibility.
Return the current organization object for user session.
Return a specific organization by the org_id.
Return a specific organization by the name.
App API for interacting with applications registered with the platform.
Find all the apps that the current user has access to
// find all apps for current active organizationAppcApp;// find all apps for the org_idAppcApp;
Find a specific app by app_guid
// find a specific appAppcApp;
Update an app details.
// update an appappapp_name = 'my new app name';AppcApp;
this API is dangerous. please be cautious in using this API as changes are irreversible.
Notification API for handling platform notification events.
Find all notifications for the logged in user:
// get all notificationsAppcNotification;
Feed API for handling platform feed events.
Find all feed events for the logged in user:
// get all feedsAppcFeed;// get all feeds for app_guidAppcFeed;// get feeds by limitAppcFeed;
The following are options that can be passed to the second parameter of findAll:
- org_id: The ID of the org that the messages were sent to
- app_guid: The guid of the app that the messages were sent to
- limit: A number of records to limit the result to
- since: A unix timestamp to get new messages from
- before: A unix timestamp to get old messages from before
API for accessing Appcelerator Cloud Services (ACS).
Create a new pre-built ACS application (mBaaS).
// create a new appAppcCloud;
- session: logged in session object
- name: specify the name of the application to create
- callback: function to invoke when completed
Returns a JSON object with the application details such as:
id: '987w498908098asdfasdfasdf'name: 'foo'status: 0created_at: '2014-09-29T19:11:40+0000'updated_at: '2014-09-29T19:11:40+0000'key: 'sdfasdfasdf0989890889asdf89asdf'oauth_key: 'asdfasdf08s09d8f09as8df098asdf098'oauth_secret: 'sfhjasdhfausdhf8878as87fdasd78f'group_id: '9890s8df908as09d8f08asdf88188'type: 1
This code is Confidential and Proprietary to Appcelerator, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Appcelerator. This file is licensed as part of the Appcelerator Platform and governed under the terms of the Appcelerator license agreement. Your right to use this software terminates when you terminate your Appcelerator subscription.
Distribution through the NPM package system located at http://npmjs.org is expressly granted if the package you are downloading is from the official Appcelerator account at http://npmjs.org/package/appc-platform-sdk.