# wishlist

Wishlist - JavaScript client for wishlist
## Wishlist API    The Wishlist API allows a developer to create and manage customer [Wishlists](https://support.bigcommerce.com/s/article/Wishlists). A Wishlist allows you to see what your customers are interested in and saving on the store. With this information you’ll be able to create targeted campaigns to help merchants grow their business. Customer API OAuth scopes give you access to Wishlists API. See [OAuth Scopes](https://developer.bigcommerce.com/api-docs/getting-started/authentication#authentication_oauth-scopes).
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 3.0
- Package version: 3.0
- Build package: io.swagger.codegen.v3.generators.javascript.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 wishlist --save
```

#### git
#
If the library is hosted at a git repository, e.g.
https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via:

```shell
    npm install GIT_USER_ID/GIT_REPO_ID --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.

### Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error:
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
the following section to your webpack config:

```javascript
module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}
```

## Getting Started

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

```javascript
var Wishlist = require('wishlist');
var defaultClient = Wishlist.ApiClient.instance;

// Configure API key authorization: X-Auth-Client
var X-Auth-Client = defaultClient.authentications['X-Auth-Client'];
X-Auth-Client.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-Auth-Client.apiKeyPrefix['X-Auth-Client'] = "Token"

// Configure API key authorization: X-Auth-Token
var X-Auth-Token = defaultClient.authentications['X-Auth-Token'];
X-Auth-Token.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//X-Auth-Token.apiKeyPrefix['X-Auth-Token'] = "Token"

var api = new Wishlist.WishlistsApi()
var wishlistId = 56; // {Number} ID of the Wishlist
var opts = { 
  'accept': "application/json", // {String} 
  'contentType': "application/json" // {String} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.wishlistsByIdDelete(wishlistId, opts, callback);
```

## Documentation for API Endpoints

All URIs are relative to *https://api.bigcommerce.com/stores/{$$.env.store_hash}/v3*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*Wishlist.WishlistsApi* | [**wishlistsByIdDelete**](docs/WishlistsApi.md#wishlistsByIdDelete) | **DELETE** /wishlists/{wishlist_id} | Delete a Wishlist
*Wishlist.WishlistsApi* | [**wishlistsByIdGet**](docs/WishlistsApi.md#wishlistsByIdGet) | **GET** /wishlists/{wishlist_id} | Get a Wishlist
*Wishlist.WishlistsApi* | [**wishlistsByIdPut**](docs/WishlistsApi.md#wishlistsByIdPut) | **PUT** /wishlists/{wishlist_id} | Update a Wishlist
*Wishlist.WishlistsApi* | [**wishlistsGet**](docs/WishlistsApi.md#wishlistsGet) | **GET** /wishlists | Get All Wishlists
*Wishlist.WishlistsApi* | [**wishlistsPost**](docs/WishlistsApi.md#wishlistsPost) | **POST** /wishlists | Create a Wishlist
*Wishlist.WishlistsItemsApi* | [**wishlistsItemsByIdDelete**](docs/WishlistsItemsApi.md#wishlistsItemsByIdDelete) | **DELETE** /wishlists/{wishlist_id}/items/{item_id} | Delete Wishlist Item
*Wishlist.WishlistsItemsApi* | [**wishlistsItemsByIdPost**](docs/WishlistsItemsApi.md#wishlistsItemsByIdPost) | **POST** /wishlists/{wishlist_id}/items | Add Wishlist Item

## Documentation for Models

 - [Wishlist.AddItemToWishlist](docs/AddItemToWishlist.md)
 - [Wishlist.Error](docs/Error.md)
 - [Wishlist.InlineResponse200](docs/InlineResponse200.md)
 - [Wishlist.InlineResponse201](docs/InlineResponse201.md)
 - [Wishlist.MetaCollection](docs/MetaCollection.md)
 - [Wishlist.MetaCollection1](docs/MetaCollection1.md)
 - [Wishlist.Pagination](docs/Pagination.md)
 - [Wishlist.Pagination1](docs/Pagination1.md)
 - [Wishlist.WishlistFull](docs/WishlistFull.md)
 - [Wishlist.WishlistFull1](docs/WishlistFull1.md)
 - [Wishlist.WishlistItem](docs/WishlistItem.md)
 - [Wishlist.WishlistItemFull](docs/WishlistItemFull.md)
 - [Wishlist.WishlistItemPost](docs/WishlistItemPost.md)
 - [Wishlist.WishlistItemPost1](docs/WishlistItemPost1.md)
 - [Wishlist.WishlistPost](docs/WishlistPost.md)
 - [Wishlist.WishlistPost1](docs/WishlistPost1.md)
 - [Wishlist.WishlistPut](docs/WishlistPut.md)
 - [Wishlist.WishlistPut1](docs/WishlistPut1.md)

## Documentation for Authorization


### X-Auth-Client

- **Type**: API key
- **API key parameter name**: X-Auth-Client
- **Location**: HTTP header

### X-Auth-Token

- **Type**: API key
- **API key parameter name**: X-Auth-Token
- **Location**: HTTP header

