tweakApi - JavaScript client for tweak-api Tweak API to integrate with all the Tweak services. You can find out more about Tweak at https://www.tweak.com, #tweak. This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: class 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 tweak-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 tweakApi = require('tweak-api');
var defaultClient = tweakApi.ApiClient.instance;
// Configure API key authorization: access_token
var access_token = defaultClient.authentications['access_token'];
access_token.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//access_token.apiKeyPrefix['access_token'] = "Token"
var api = new tweakApi.CategoryApi()
var opts = {
'where': "where_example" // {String} Criteria to match model instances
};
api.categoryCount(opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
All URIs are relative to https://apidevcdn.tweak.com/api
Class | Method | HTTP request | Description |
---|---|---|---|
tweakApi.CategoryApi | categoryCount | GET /Categories/count | Count instances of the model matched by where from the data source. |
tweakApi.CategoryApi | categoryCreate | POST /Categories | Create a new instance of the model and persist it into the data source. |
tweakApi.CategoryApi | categoryCreateChangeStreamGetCategoriesChangeStream | GET /Categories/change-stream | Create a change stream. |
tweakApi.CategoryApi | categoryCreateChangeStreamPostCategoriesChangeStream | POST /Categories/change-stream | Create a change stream. |
tweakApi.CategoryApi | categoryDeleteById | DELETE /Categories/{id} | Delete a model instance by {{id}} from the data source. |
tweakApi.CategoryApi | categoryExistsGetCategoriesidExists | GET /Categories/{id}/exists | Check whether a model instance exists in the data source. |
tweakApi.CategoryApi | categoryExistsHeadCategoriesid | HEAD /Categories/{id} | Check whether a model instance exists in the data source. |
tweakApi.CategoryApi | categoryFind | GET /Categories | Find all instances of the model matched by filter from the data source. |
tweakApi.CategoryApi | categoryFindById | GET /Categories/{id} | Find a model instance by {{id}} from the data source. |
tweakApi.CategoryApi | categoryFindOne | GET /Categories/findOne | Find first instance of the model matched by filter from the data source. |
tweakApi.CategoryApi | categoryPrototypeCountChildren | GET /Categories/{id}/children/count | Counts children of Category. |
tweakApi.CategoryApi | categoryPrototypeCreateChildren | POST /Categories/{id}/children | Creates a new instance in children of this model. |
tweakApi.CategoryApi | categoryPrototypeDeleteChildren | DELETE /Categories/{id}/children | Deletes all children of this model. |
tweakApi.CategoryApi | categoryPrototypeDestroyByIdChildren | DELETE /Categories/{id}/children/{fk} | Delete a related item by id for children. |
tweakApi.CategoryApi | categoryPrototypeFindByIdChildren | GET /Categories/{id}/children/{fk} | Find a related item by id for children. |
tweakApi.CategoryApi | categoryPrototypeGetChildren | GET /Categories/{id}/children | Queries children of Category. |
tweakApi.CategoryApi | categoryPrototypeGetParent | GET /Categories/{id}/parent | Fetches belongsTo relation parent. |
tweakApi.CategoryApi | categoryPrototypeUpdateAttributesPatchCategoriesid | PATCH /Categories/{id} | Patch attributes for a model instance and persist it into the data source. |
tweakApi.CategoryApi | categoryPrototypeUpdateAttributesPutCategoriesid | PUT /Categories/{id} | Patch attributes for a model instance and persist it into the data source. |
tweakApi.CategoryApi | categoryPrototypeUpdateByIdChildren | PUT /Categories/{id}/children/{fk} | Update a related item by id for children. |
tweakApi.CategoryApi | categoryReplaceById | POST /Categories/{id}/replace | Replace attributes for a model instance and persist it into the data source. |
tweakApi.CategoryApi | categoryReplaceOrCreate | POST /Categories/replaceOrCreate | Replace an existing model instance or insert a new one into the data source. |
tweakApi.CategoryApi | categoryUpdateAll | POST /Categories/update | Update instances of the model matched by {{where}} from the data source. |
tweakApi.CategoryApi | categoryUpsertPatchCategories | PATCH /Categories | Patch an existing model instance or insert a new one into the data source. |
tweakApi.CategoryApi | categoryUpsertPutCategories | PUT /Categories | Patch an existing model instance or insert a new one into the data source. |
tweakApi.CategoryApi | categoryUpsertWithWhere | POST /Categories/upsertWithWhere | Update an existing model instance or insert a new one into the data source based on the where criteria. |
tweakApi.CustomerApi | customerConfirm | GET /Customers/confirm | Confirm a user registration with email verification token. |
tweakApi.CustomerApi | customerCount | GET /Customers/count | Count instances of the model matched by where from the data source. |
tweakApi.CustomerApi | customerCreate | POST /Customers | Create a new instance of the model and persist it into the data source. |
tweakApi.CustomerApi | customerCreateChangeStreamGetCustomersChangeStream | GET /Customers/change-stream | Create a change stream. |
tweakApi.CustomerApi | customerCreateChangeStreamPostCustomersChangeStream | POST /Customers/change-stream | Create a change stream. |
tweakApi.CustomerApi | customerDeleteById | DELETE /Customers/{id} | Delete a model instance by {{id}} from the data source. |
tweakApi.CustomerApi | customerExistsGetCustomersidExists | GET /Customers/{id}/exists | Check whether a model instance exists in the data source. |
tweakApi.CustomerApi | customerExistsHeadCustomersid | HEAD /Customers/{id} | Check whether a model instance exists in the data source. |
tweakApi.CustomerApi | customerFind | GET /Customers | Find all instances of the model matched by filter from the data source. |
tweakApi.CustomerApi | customerFindById | GET /Customers/{id} | Find a model instance by {{id}} from the data source. |
tweakApi.CustomerApi | customerFindOne | GET /Customers/findOne | Find first instance of the model matched by filter from the data source. |
tweakApi.CustomerApi | customerLogin | POST /Customers/login | Login a user with username/email and password. |
tweakApi.CustomerApi | customerLogout | POST /Customers/logout | Logout a user with access token. |
tweakApi.CustomerApi | customerPrototypeCountAccessTokens | GET /Customers/{id}/accessTokens/count | Counts accessTokens of Customer. |
tweakApi.CustomerApi | customerPrototypeCountDesigns | GET /Customers/{id}/designs/count | Counts designs of Customer. |
tweakApi.CustomerApi | customerPrototypeCreateAccessTokens | POST /Customers/{id}/accessTokens | Creates a new instance in accessTokens of this model. |
tweakApi.CustomerApi | customerPrototypeCreateDesigns | POST /Customers/{id}/designs | Creates a new instance in designs of this model. |
tweakApi.CustomerApi | customerPrototypeDeleteAccessTokens | DELETE /Customers/{id}/accessTokens | Deletes all accessTokens of this model. |
tweakApi.CustomerApi | customerPrototypeDeleteDesigns | DELETE /Customers/{id}/designs | Deletes all designs of this model. |
tweakApi.CustomerApi | customerPrototypeDestroyByIdAccessTokens | DELETE /Customers/{id}/accessTokens/{fk} | Delete a related item by id for accessTokens. |
tweakApi.CustomerApi | customerPrototypeDestroyByIdDesigns | DELETE /Customers/{id}/designs/{fk} | Delete a related item by id for designs. |
tweakApi.CustomerApi | customerPrototypeFindByIdAccessTokens | GET /Customers/{id}/accessTokens/{fk} | Find a related item by id for accessTokens. |
tweakApi.CustomerApi | customerPrototypeFindByIdDesigns | GET /Customers/{id}/designs/{fk} | Find a related item by id for designs. |
tweakApi.CustomerApi | customerPrototypeGetAccessTokens | GET /Customers/{id}/accessTokens | Queries accessTokens of Customer. |
tweakApi.CustomerApi | customerPrototypeGetDesigns | GET /Customers/{id}/designs | Queries designs of Customer. |
tweakApi.CustomerApi | customerPrototypeUpdateAttributesPatchCustomersid | PATCH /Customers/{id} | Patch attributes for a model instance and persist it into the data source. |
tweakApi.CustomerApi | customerPrototypeUpdateAttributesPutCustomersid | PUT /Customers/{id} | Patch attributes for a model instance and persist it into the data source. |
tweakApi.CustomerApi | customerPrototypeUpdateByIdAccessTokens | PUT /Customers/{id}/accessTokens/{fk} | Update a related item by id for accessTokens. |
tweakApi.CustomerApi | customerPrototypeUpdateByIdDesigns | PUT /Customers/{id}/designs/{fk} | Update a related item by id for designs. |
tweakApi.CustomerApi | customerReplaceById | POST /Customers/{id}/replace | Replace attributes for a model instance and persist it into the data source. |
tweakApi.CustomerApi | customerReplaceOrCreate | POST /Customers/replaceOrCreate | Replace an existing model instance or insert a new one into the data source. |
tweakApi.CustomerApi | customerResetPassword | POST /Customers/reset | Reset password for a user with email. |
tweakApi.CustomerApi | customerUpdateAll | POST /Customers/update | Update instances of the model matched by {{where}} from the data source. |
tweakApi.CustomerApi | customerUpsertPatchCustomers | PATCH /Customers | Patch an existing model instance or insert a new one into the data source. |
tweakApi.CustomerApi | customerUpsertPutCustomers | PUT /Customers | Patch an existing model instance or insert a new one into the data source. |
tweakApi.CustomerApi | customerUpsertWithWhere | POST /Customers/upsertWithWhere | Update an existing model instance or insert a new one into the data source based on the where criteria. |
tweakApi.DesignApi | designCount | GET /Designs/count | Count instances of the model matched by where from the data source. |
tweakApi.DesignApi | designCreate | POST /Designs | Create a new instance of the model and persist it into the data source. |
tweakApi.DesignApi | designCreateChangeStreamGetDesignsChangeStream | GET /Designs/change-stream | Create a change stream. |
tweakApi.DesignApi | designCreateChangeStreamPostDesignsChangeStream | POST /Designs/change-stream | Create a change stream. |
tweakApi.DesignApi | designDeleteById | DELETE /Designs/{id} | Delete a model instance by {{id}} from the data source. |
tweakApi.DesignApi | designExistsGetDesignsidExists | GET /Designs/{id}/exists | Check whether a model instance exists in the data source. |
tweakApi.DesignApi | designExistsHeadDesignsid | HEAD /Designs/{id} | Check whether a model instance exists in the data source. |
tweakApi.DesignApi | designFind | GET /Designs | Find all instances of the model matched by filter from the data source. |
tweakApi.DesignApi | designFindById | GET /Designs/{id} | Find a model instance by {{id}} from the data source. |
tweakApi.DesignApi | designFindOne | GET /Designs/findOne | Find first instance of the model matched by filter from the data source. |
tweakApi.DesignApi | designPrototypeCountCategories | GET /Designs/{id}/categories/count | Counts categories of Design. |
tweakApi.DesignApi | designPrototypeCountTags | GET /Designs/{id}/tags/count | Counts tags of Design. |
tweakApi.DesignApi | designPrototypeCreateCategories | POST /Designs/{id}/categories | Creates a new instance in categories of this model. |
tweakApi.DesignApi | designPrototypeCreateTags | POST /Designs/{id}/tags | Creates a new instance in tags of this model. |
tweakApi.DesignApi | designPrototypeDeleteCategories | DELETE /Designs/{id}/categories | Deletes all categories of this model. |
tweakApi.DesignApi | designPrototypeDeleteTags | DELETE /Designs/{id}/tags | Deletes all tags of this model. |
tweakApi.DesignApi | designPrototypeDestroyByIdCategories | DELETE /Designs/{id}/categories/{fk} | Delete a related item by id for categories. |
tweakApi.DesignApi | designPrototypeDestroyByIdTags | DELETE /Designs/{id}/tags/{fk} | Delete a related item by id for tags. |
tweakApi.DesignApi | designPrototypeFindByIdCategories | GET /Designs/{id}/categories/{fk} | Find a related item by id for categories. |
tweakApi.DesignApi | designPrototypeFindByIdTags | GET /Designs/{id}/tags/{fk} | Find a related item by id for tags. |
tweakApi.DesignApi | designPrototypeGetCategories | GET /Designs/{id}/categories | Queries categories of Design. |
tweakApi.DesignApi | designPrototypeGetCustomer | GET /Designs/{id}/customer | Fetches belongsTo relation customer. |
tweakApi.DesignApi | designPrototypeGetTags | GET /Designs/{id}/tags | Queries tags of Design. |
tweakApi.DesignApi | designPrototypeUpdateAttributesPatchDesignsid | PATCH /Designs/{id} | Patch attributes for a model instance and persist it into the data source. |
tweakApi.DesignApi | designPrototypeUpdateAttributesPutDesignsid | PUT /Designs/{id} | Patch attributes for a model instance and persist it into the data source. |
tweakApi.DesignApi | designPrototypeUpdateByIdCategories | PUT /Designs/{id}/categories/{fk} | Update a related item by id for categories. |
tweakApi.DesignApi | designPrototypeUpdateByIdTags | PUT /Designs/{id}/tags/{fk} | Update a related item by id for tags. |
tweakApi.DesignApi | designReplaceById | POST /Designs/{id}/replace | Replace attributes for a model instance and persist it into the data source. |
tweakApi.DesignApi | designReplaceOrCreate | POST /Designs/replaceOrCreate | Replace an existing model instance or insert a new one into the data source. |
tweakApi.DesignApi | designUpdateAll | POST /Designs/update | Update instances of the model matched by {{where}} from the data source. |
tweakApi.DesignApi | designUpsertPatchDesigns | PATCH /Designs | Patch an existing model instance or insert a new one into the data source. |
tweakApi.DesignApi | designUpsertPutDesigns | PUT /Designs | Patch an existing model instance or insert a new one into the data source. |
tweakApi.DesignApi | designUpsertWithWhere | POST /Designs/upsertWithWhere | Update an existing model instance or insert a new one into the data source based on the where criteria. |
tweakApi.MessageApi | messageGreet | GET /Messages/greet | |
tweakApi.TagApi | tagCount | GET /Tags/count | Count instances of the model matched by where from the data source. |
tweakApi.TagApi | tagCreate | POST /Tags | Create a new instance of the model and persist it into the data source. |
tweakApi.TagApi | tagCreateChangeStreamGetTagsChangeStream | GET /Tags/change-stream | Create a change stream. |
tweakApi.TagApi | tagCreateChangeStreamPostTagsChangeStream | POST /Tags/change-stream | Create a change stream. |
tweakApi.TagApi | tagDeleteById | DELETE /Tags/{id} | Delete a model instance by {{id}} from the data source. |
tweakApi.TagApi | tagExistsGetTagsidExists | GET /Tags/{id}/exists | Check whether a model instance exists in the data source. |
tweakApi.TagApi | tagExistsHeadTagsid | HEAD /Tags/{id} | Check whether a model instance exists in the data source. |
tweakApi.TagApi | tagFind | GET /Tags | Find all instances of the model matched by filter from the data source. |
tweakApi.TagApi | tagFindById | GET /Tags/{id} | Find a model instance by {{id}} from the data source. |
tweakApi.TagApi | tagFindOne | GET /Tags/findOne | Find first instance of the model matched by filter from the data source. |
tweakApi.TagApi | tagPrototypeUpdateAttributesPatchTagsid | PATCH /Tags/{id} | Patch attributes for a model instance and persist it into the data source. |
tweakApi.TagApi | tagPrototypeUpdateAttributesPutTagsid | PUT /Tags/{id} | Patch attributes for a model instance and persist it into the data source. |
tweakApi.TagApi | tagReplaceById | POST /Tags/{id}/replace | Replace attributes for a model instance and persist it into the data source. |
tweakApi.TagApi | tagReplaceOrCreate | POST /Tags/replaceOrCreate | Replace an existing model instance or insert a new one into the data source. |
tweakApi.TagApi | tagUpdateAll | POST /Tags/update | Update instances of the model matched by {{where}} from the data source. |
tweakApi.TagApi | tagUpsertPatchTags | PATCH /Tags | Patch an existing model instance or insert a new one into the data source. |
tweakApi.TagApi | tagUpsertPutTags | PUT /Tags | Patch an existing model instance or insert a new one into the data source. |
tweakApi.TagApi | tagUpsertWithWhere | POST /Tags/upsertWithWhere | Update an existing model instance or insert a new one into the data source based on the where criteria. |
tweakApi.UserApi | userConfirm | GET /Users/confirm | Confirm a user registration with email verification token. |
tweakApi.UserApi | userCount | GET /Users/count | Count instances of the model matched by where from the data source. |
tweakApi.UserApi | userCreate | POST /Users | Create a new instance of the model and persist it into the data source. |
tweakApi.UserApi | userCreateChangeStreamGetUsersChangeStream | GET /Users/change-stream | Create a change stream. |
tweakApi.UserApi | userCreateChangeStreamPostUsersChangeStream | POST /Users/change-stream | Create a change stream. |
tweakApi.UserApi | userDeleteById | DELETE /Users/{id} | Delete a model instance by {{id}} from the data source. |
tweakApi.UserApi | userExistsGetUsersidExists | GET /Users/{id}/exists | Check whether a model instance exists in the data source. |
tweakApi.UserApi | userExistsHeadUsersid | HEAD /Users/{id} | Check whether a model instance exists in the data source. |
tweakApi.UserApi | userFind | GET /Users | Find all instances of the model matched by filter from the data source. |
tweakApi.UserApi | userFindById | GET /Users/{id} | Find a model instance by {{id}} from the data source. |
tweakApi.UserApi | userFindOne | GET /Users/findOne | Find first instance of the model matched by filter from the data source. |
tweakApi.UserApi | userLogin | POST /Users/login | Login a user with username/email and password. |
tweakApi.UserApi | userLogout | POST /Users/logout | Logout a user with access token. |
tweakApi.UserApi | userPrototypeCountAccessTokens | GET /Users/{id}/accessTokens/count | Counts accessTokens of User. |
tweakApi.UserApi | userPrototypeCreateAccessTokens | POST /Users/{id}/accessTokens | Creates a new instance in accessTokens of this model. |
tweakApi.UserApi | userPrototypeDeleteAccessTokens | DELETE /Users/{id}/accessTokens | Deletes all accessTokens of this model. |
tweakApi.UserApi | userPrototypeDestroyByIdAccessTokens | DELETE /Users/{id}/accessTokens/{fk} | Delete a related item by id for accessTokens. |
tweakApi.UserApi | userPrototypeFindByIdAccessTokens | GET /Users/{id}/accessTokens/{fk} | Find a related item by id for accessTokens. |
tweakApi.UserApi | userPrototypeGetAccessTokens | GET /Users/{id}/accessTokens | Queries accessTokens of User. |
tweakApi.UserApi | userPrototypeUpdateAttributesPatchUsersid | PATCH /Users/{id} | Patch attributes for a model instance and persist it into the data source. |
tweakApi.UserApi | userPrototypeUpdateAttributesPutUsersid | PUT /Users/{id} | Patch attributes for a model instance and persist it into the data source. |
tweakApi.UserApi | userPrototypeUpdateByIdAccessTokens | PUT /Users/{id}/accessTokens/{fk} | Update a related item by id for accessTokens. |
tweakApi.UserApi | userReplaceById | POST /Users/{id}/replace | Replace attributes for a model instance and persist it into the data source. |
tweakApi.UserApi | userReplaceOrCreate | POST /Users/replaceOrCreate | Replace an existing model instance or insert a new one into the data source. |
tweakApi.UserApi | userResetPassword | POST /Users/reset | Reset password for a user with email. |
tweakApi.UserApi | userUpdateAll | POST /Users/update | Update instances of the model matched by {{where}} from the data source. |
tweakApi.UserApi | userUpsertPatchUsers | PATCH /Users | Patch an existing model instance or insert a new one into the data source. |
tweakApi.UserApi | userUpsertPutUsers | PUT /Users | Patch an existing model instance or insert a new one into the data source. |
tweakApi.UserApi | userUpsertWithWhere | POST /Users/upsertWithWhere | Update an existing model instance or insert a new one into the data source based on the where criteria. |
- tweakApi.AccessToken
- tweakApi.Category
- tweakApi.Customer
- tweakApi.Design
- tweakApi.InlineResponse200
- tweakApi.InlineResponse2001
- tweakApi.InlineResponse2002
- tweakApi.InlineResponse2003
- tweakApi.Tag
- tweakApi.User
- Type: API key
- API key parameter name: access_token
- Location: URL query string