1.2.0 • Published 8 years ago

cymbio_api v1.2.0

Weekly downloads
1
License
Apache-2.0
Repository
-
Last release
8 years ago

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

ClassMethodHTTP requestDescription
CymbioApi.AnalyticsApigetAnalyticsGET /analyticsRetrieves store analytics
CymbioApi.EventApigetPixelGET /pixel.gifSaves a new analytics event, all events except 'CYMBIO_LOAD' requires a data object, data changes between events types
CymbioApi.EventApipostEventPOST /eventsSaves a new analytics event, all events except 'CYMBIO_LOAD' requires a data object, data changes between events types
CymbioApi.OrderApipostOrderPOST /ordersNew order
CymbioApi.OrderApiputOrderPUT /orders/{order_id}Updates an order
CymbioApi.ProductApideleteProductsDELETE /productsDeletes a store product
CymbioApi.ProductApigetProductAvailableGET /products/availableChecks if this product is available
CymbioApi.ProductApigetProductsGET /productsRetrieves store products
CymbioApi.ProductApigetProductsCountGET /products/countReturns the product count for a store
CymbioApi.ProductApipostProductsPOST /productsSaves a store product
CymbioApi.SearchApiextendGET /extendReturns products to extand a store search.
CymbioApi.SearchApigetProductGET /extend/product/{product_id}Returnes details of an extended product.
CymbioApi.StoreApiaddAdminPOST /stores/addAdminAdds another admin to the store.
CymbioApi.StoreApibecomeSupplierPOST /stores/becomeSupplierApply to become a selling store.
CymbioApi.StoreApicancelBecomeSupplierPOST /stores/cancelBecomeSupplierCancel Application to become a selling store.
CymbioApi.StoreApicancelPaymentMethodGET /stores/cancelPaymentMethodGets the url to the given payment method approval page.
CymbioApi.StoreApideleteStoreDELETE /storesMarks a store as un-active
CymbioApi.StoreApigetPaymentMethodUrlGET /stores/getPaymentMethodUrlGets the url to the given payment method approval page.
CymbioApi.StoreApigetStoreGET /storesRetrieves a store
CymbioApi.StoreApipostStorePOST /storesSaves or updates a store
CymbioApi.StoreApiputStorePUT /storesUpdates a store
CymbioApi.StoreApisaveCreditcardPOST /stores/saveCreditcardSaves a new creditcard for the store.
CymbioApi.UserApiauthenticateUserGET /users/authenticateReturns the user token
CymbioApi.UserApipostUserPOST /usersCreate user
CymbioApi.UserApisendResetPasswordGET /users/sendResetPasswordSends the user a password reset email

Documentation for Models

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