# cymbio_api

CymbioApi - JavaScript client for cymbio_api
API for the Cymbio Network
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/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](https://nodejs.org/)

#### npm

To publish the library as a [npm](https://www.npmjs.com/),
please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).

Then install it via:

```shell
npm install cymbio_api --save
```

### For browser

The library also works in the browser environment via npm and [browserify](http://browserify.org/). 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):

```shell
browserify main.js > bundle.js
```

Then include *bundle.js* in the HTML pages.

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript
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**](docs/AnalyticsApi.md#getAnalytics) | **GET** /analytics | Retrieves store analytics
*CymbioApi.EventApi* | [**getPixel**](docs/EventApi.md#getPixel) | **GET** /pixel.gif | Saves a new analytics event, all events except &#39;CYMBIO_LOAD&#39; requires a data object, data changes between events types
*CymbioApi.EventApi* | [**postEvent**](docs/EventApi.md#postEvent) | **POST** /events | Saves a new analytics event, all events except &#39;CYMBIO_LOAD&#39; requires a data object, data changes between events types
*CymbioApi.OrderApi* | [**postOrder**](docs/OrderApi.md#postOrder) | **POST** /orders | New order
*CymbioApi.OrderApi* | [**putOrder**](docs/OrderApi.md#putOrder) | **PUT** /orders/{order_id} | Updates an order
*CymbioApi.ProductApi* | [**deleteProducts**](docs/ProductApi.md#deleteProducts) | **DELETE** /products | Deletes a store product
*CymbioApi.ProductApi* | [**getProductAvailable**](docs/ProductApi.md#getProductAvailable) | **GET** /products/available | Checks if this product is available
*CymbioApi.ProductApi* | [**getProducts**](docs/ProductApi.md#getProducts) | **GET** /products | Retrieves store products
*CymbioApi.ProductApi* | [**getProductsCount**](docs/ProductApi.md#getProductsCount) | **GET** /products/count | Returns the product count for a store
*CymbioApi.ProductApi* | [**postProducts**](docs/ProductApi.md#postProducts) | **POST** /products | Saves a store product
*CymbioApi.SearchApi* | [**extend**](docs/SearchApi.md#extend) | **GET** /extend | Returns products to extand a store search.
*CymbioApi.SearchApi* | [**getProduct**](docs/SearchApi.md#getProduct) | **GET** /extend/product/{product_id} | Returnes details of an extended product.
*CymbioApi.StoreApi* | [**addAdmin**](docs/StoreApi.md#addAdmin) | **POST** /stores/addAdmin | Adds another admin to the store.
*CymbioApi.StoreApi* | [**becomeSupplier**](docs/StoreApi.md#becomeSupplier) | **POST** /stores/becomeSupplier | Apply to become a selling store.
*CymbioApi.StoreApi* | [**cancelBecomeSupplier**](docs/StoreApi.md#cancelBecomeSupplier) | **POST** /stores/cancelBecomeSupplier | Cancel Application to become a selling store.
*CymbioApi.StoreApi* | [**cancelPaymentMethod**](docs/StoreApi.md#cancelPaymentMethod) | **GET** /stores/cancelPaymentMethod | Gets the url to the given payment method approval page.
*CymbioApi.StoreApi* | [**deleteStore**](docs/StoreApi.md#deleteStore) | **DELETE** /stores | Marks a store as un-active
*CymbioApi.StoreApi* | [**getPaymentMethodUrl**](docs/StoreApi.md#getPaymentMethodUrl) | **GET** /stores/getPaymentMethodUrl | Gets the url to the given payment method approval page.
*CymbioApi.StoreApi* | [**getStore**](docs/StoreApi.md#getStore) | **GET** /stores | Retrieves a store
*CymbioApi.StoreApi* | [**postStore**](docs/StoreApi.md#postStore) | **POST** /stores | Saves or updates a store
*CymbioApi.StoreApi* | [**putStore**](docs/StoreApi.md#putStore) | **PUT** /stores | Updates a store
*CymbioApi.StoreApi* | [**saveCreditcard**](docs/StoreApi.md#saveCreditcard) | **POST** /stores/saveCreditcard | Saves a new creditcard for the store.
*CymbioApi.UserApi* | [**authenticateUser**](docs/UserApi.md#authenticateUser) | **GET** /users/authenticate | Returns the user token
*CymbioApi.UserApi* | [**postUser**](docs/UserApi.md#postUser) | **POST** /users | Create user
*CymbioApi.UserApi* | [**sendResetPassword**](docs/UserApi.md#sendResetPassword) | **GET** /users/sendResetPassword | Sends the user a password reset email


## Documentation for Models

 - [CymbioApi.Analytics](docs/Analytics.md)
 - [CymbioApi.BecomeSupplierContact](docs/BecomeSupplierContact.md)
 - [CymbioApi.BecomeSupplierForm](docs/BecomeSupplierForm.md)
 - [CymbioApi.BillingInfo](docs/BillingInfo.md)
 - [CymbioApi.Body](docs/Body.md)
 - [CymbioApi.Error](docs/Error.md)
 - [CymbioApi.ExtendResults](docs/ExtendResults.md)
 - [CymbioApi.InlineResponse200](docs/InlineResponse200.md)
 - [CymbioApi.InlineResponse2001](docs/InlineResponse2001.md)
 - [CymbioApi.InlineResponse2002](docs/InlineResponse2002.md)
 - [CymbioApi.InlineResponse2003](docs/InlineResponse2003.md)
 - [CymbioApi.InlineResponse2004](docs/InlineResponse2004.md)
 - [CymbioApi.InlineResponse2005](docs/InlineResponse2005.md)
 - [CymbioApi.InlineResponse2006](docs/InlineResponse2006.md)
 - [CymbioApi.InlineResponse2007](docs/InlineResponse2007.md)
 - [CymbioApi.InlineResponse2008](docs/InlineResponse2008.md)
 - [CymbioApi.NewEvent](docs/NewEvent.md)
 - [CymbioApi.NewOrder](docs/NewOrder.md)
 - [CymbioApi.NewProduct](docs/NewProduct.md)
 - [CymbioApi.NewStore](docs/NewStore.md)
 - [CymbioApi.NewUser](docs/NewUser.md)
 - [CymbioApi.OrderItem](docs/OrderItem.md)
 - [CymbioApi.PaymentMethod](docs/PaymentMethod.md)
 - [CymbioApi.Product](docs/Product.md)
 - [CymbioApi.ProductStore](docs/ProductStore.md)
 - [CymbioApi.ProductVariant](docs/ProductVariant.md)
 - [CymbioApi.ProductVariantOptions](docs/ProductVariantOptions.md)
 - [CymbioApi.ShippingInfo](docs/ShippingInfo.md)
 - [CymbioApi.Store](docs/Store.md)
 - [CymbioApi.UpdateOrder](docs/UpdateOrder.md)
 - [CymbioApi.UpdateOrderItem](docs/UpdateOrderItem.md)


## 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

