CapAppApi - JavaScript client for cap_app_api CapApp services. This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.0.rc-01
- Package version: 1.0.0.rc-01
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
For Node.js
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install cap_app_api --save
If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Please follow the installation instruction and execute the following JS code:
var CapAppApi = require('cap_app_api');
var defaultClient = CapAppApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: capapp_auth
var capapp_auth = defaultClient.authentications['capapp_auth'];
capapp_auth.accessToken = "YOUR ACCESS TOKEN"
var api = new CapAppApi.BookingApi()
var bookings = new CapAppApi.Bookings(); // {Bookings} The bookings for the week.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.updateWeek(bookings, callback);
All URIs are relative to https://endpoints-dot-capappw.appspot.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
CapAppApi.BookingApi | updateWeek | POST /bookings/update | Update a set of bookings for this week. Add if new. |
CapAppApi.UserApi | getUser | GET /user/me | User profile |
CapAppApi.UserApi | loginUser | POST /user/login | Login a user and add the user if new. |
- CapAppApi.Booking
- CapAppApi.Bookings
- CapAppApi.Error
- CapAppApi.HasLongId
- CapAppApi.Paging
- CapAppApi.User
- CapAppApi.Users
- Type: OAuth
- Flow: implicit
- Authorization URL: Not used
-
Scopes:
- capapp: Perform actions on behalf of the CapApp organization.
- user: Perform actions on behalf of an individual user.