Divshot Api
Wrapper for the Divshot API.
Contents
Install
npm install divshot --save
Usage
Refer to the Narrator api for a more in depth understanding of all available methods.
CommonJS (Node/Browserify)
var Divshot = ;
Standalone
<script src="/path/to/divshot.standalone.min.js"></div>
Instantiate
var api = Divshot;
Angular Module
Located at /dist/divshot.angular.js
angular ;
User
By default, the authenticate
method will be called on each request as a pre hook. If a token is provided, this does not create another http request.
apiuser; apiuser; // User dataapiuserself;// ORapiuseriduserId; // Update uservar user = apiuseriduserId;user;
User password
// Change passworddivshotuserpassword;
User Emails
// Add emaildivshotuseremails; // Set primary emaildivshotuseremails; // Remove emaildivshotuseremails; // Resend emaildivshotuseremails;
Organizations
// Users orgsdivshotorganizations; // A single organizationdivshotorganizationsidsomeOrgId; // Apps from an organizationdivshotorganizationsidsomeOrgIdapps; // Update organizationdivshotorganizationsidsomeOrgId;
Organization Members
// Get org membersdivshotorganizationsidsomeOrgmembers; // Invite members to organizationdivshotorganizationsidsomeOrgmembers; // Update a member in organiztiondivshotorganizationsidsomeOrgmembersidmemberid; // Remove a member from an organizationdivshotorganizationsidsomeOrgmembersidmemberId;
Apps
// List appsapiapps; // Create an appapiapps; // A specific appvar app = apiappsid'app name';app;
Builds
appbuilds; appbuildsid'build id'; appbuildsid'build id'; appbuildsid'build id';
Releases
appreleases; appreleases; appreleases; appreleases;
Domains
// List domains for an appappdomains; // Add a domainappdomains; // Remove a domainappdomains;
App Environment Configuration
app;
Build
grunt build