1.2.0 • Published 8 years ago
cymbio_api v1.2.0
cymbio_api
CymbioApi - JavaScript client for cymbio_api API for the Cymbio Network This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build date: 2016-10-27T09:15:43.094Z
- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install cymbio_api --save
For browser
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.
Getting Started
Please follow the installation instruction and execute the following JS code:
var CymbioApi = require('cymbio_api');
var defaultClient = CymbioApi.ApiClient.instance;
// Configure API key authorization: jwtStore
var jwtStore = defaultClient.authentications['jwtStore'];
jwtStore.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//jwtStore.apiKeyPrefix['Authorization'] = "Token"
var api = new CymbioApi.AnalyticsApi()
var startDay = new Date("2013-10-20"); // {Date} Start day of the daye interval (As defined by full-date - RFC3339)
var endDay = new Date("2013-10-20"); // {Date} End day of the daye interval (As defined by full-date - RFC3339)
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAnalytics(startDay, endDay, callback);
Documentation for API Endpoints
All URIs are relative to http://api1.cym.bio/v1
Class | Method | HTTP request | Description |
---|---|---|---|
CymbioApi.AnalyticsApi | getAnalytics | GET /analytics | Retrieves store analytics |
CymbioApi.EventApi | getPixel | GET /pixel.gif | Saves a new analytics event, all events except 'CYMBIO_LOAD' requires a data object, data changes between events types |
CymbioApi.EventApi | postEvent | POST /events | Saves a new analytics event, all events except 'CYMBIO_LOAD' requires a data object, data changes between events types |
CymbioApi.OrderApi | postOrder | POST /orders | New order |
CymbioApi.OrderApi | putOrder | PUT /orders/{order_id} | Updates an order |
CymbioApi.ProductApi | deleteProducts | DELETE /products | Deletes a store product |
CymbioApi.ProductApi | getProductAvailable | GET /products/available | Checks if this product is available |
CymbioApi.ProductApi | getProducts | GET /products | Retrieves store products |
CymbioApi.ProductApi | getProductsCount | GET /products/count | Returns the product count for a store |
CymbioApi.ProductApi | postProducts | POST /products | Saves a store product |
CymbioApi.SearchApi | extend | GET /extend | Returns products to extand a store search. |
CymbioApi.SearchApi | getProduct | GET /extend/product/{product_id} | Returnes details of an extended product. |
CymbioApi.StoreApi | addAdmin | POST /stores/addAdmin | Adds another admin to the store. |
CymbioApi.StoreApi | becomeSupplier | POST /stores/becomeSupplier | Apply to become a selling store. |
CymbioApi.StoreApi | cancelBecomeSupplier | POST /stores/cancelBecomeSupplier | Cancel Application to become a selling store. |
CymbioApi.StoreApi | cancelPaymentMethod | GET /stores/cancelPaymentMethod | Gets the url to the given payment method approval page. |
CymbioApi.StoreApi | deleteStore | DELETE /stores | Marks a store as un-active |
CymbioApi.StoreApi | getPaymentMethodUrl | GET /stores/getPaymentMethodUrl | Gets the url to the given payment method approval page. |
CymbioApi.StoreApi | getStore | GET /stores | Retrieves a store |
CymbioApi.StoreApi | postStore | POST /stores | Saves or updates a store |
CymbioApi.StoreApi | putStore | PUT /stores | Updates a store |
CymbioApi.StoreApi | saveCreditcard | POST /stores/saveCreditcard | Saves a new creditcard for the store. |
CymbioApi.UserApi | authenticateUser | GET /users/authenticate | Returns the user token |
CymbioApi.UserApi | postUser | POST /users | Create user |
CymbioApi.UserApi | sendResetPassword | GET /users/sendResetPassword | Sends the user a password reset email |
Documentation for Models
- CymbioApi.Analytics
- CymbioApi.BecomeSupplierContact
- CymbioApi.BecomeSupplierForm
- CymbioApi.BillingInfo
- CymbioApi.Body
- CymbioApi.Error
- CymbioApi.ExtendResults
- CymbioApi.InlineResponse200
- CymbioApi.InlineResponse2001
- CymbioApi.InlineResponse2002
- CymbioApi.InlineResponse2003
- CymbioApi.InlineResponse2004
- CymbioApi.InlineResponse2005
- CymbioApi.InlineResponse2006
- CymbioApi.InlineResponse2007
- CymbioApi.InlineResponse2008
- CymbioApi.NewEvent
- CymbioApi.NewOrder
- CymbioApi.NewProduct
- CymbioApi.NewStore
- CymbioApi.NewUser
- CymbioApi.OrderItem
- CymbioApi.PaymentMethod
- CymbioApi.Product
- CymbioApi.ProductStore
- CymbioApi.ProductVariant
- CymbioApi.ProductVariantOptions
- CymbioApi.ShippingInfo
- CymbioApi.Store
- CymbioApi.UpdateOrder
- CymbioApi.UpdateOrderItem
Documentation for Authorization
jwtUser
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
jwtStore
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header