Skip to content

Commit 12e600e

Browse files
committed
Auto-generate wrapper from updated spec
1 parent d7522ba commit 12e600e

File tree

189 files changed

+15937
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+15937
-0
lines changed

.babelrc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env"
4+
],
5+
"plugins": [
6+
"@babel/plugin-syntax-dynamic-import",
7+
"@babel/plugin-syntax-import-meta",
8+
"@babel/plugin-proposal-class-properties",
9+
"@babel/plugin-proposal-json-strings",
10+
[
11+
"@babel/plugin-proposal-decorators",
12+
{
13+
"legacy": true
14+
}
15+
],
16+
"@babel/plugin-proposal-function-sent",
17+
"@babel/plugin-proposal-export-namespace-from",
18+
"@babel/plugin-proposal-numeric-separator",
19+
"@babel/plugin-proposal-throw-expressions",
20+
"@babel/plugin-proposal-export-default-from",
21+
"@babel/plugin-proposal-logical-assignment-operators",
22+
"@babel/plugin-proposal-optional-chaining",
23+
[
24+
"@babel/plugin-proposal-pipeline-operator",
25+
{
26+
"proposal": "minimal"
27+
}
28+
],
29+
"@babel/plugin-proposal-nullish-coalescing-operator",
30+
"@babel/plugin-proposal-do-expressions",
31+
"@babel/plugin-proposal-function-bind"
32+
]
33+
}

.openapi-generator-ignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
cache: npm
3+
node_js:
4+
- "6"
5+
- "6.1"

README.md

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
# built_by_bit_api
2+
3+
BuiltByBitApi - JavaScript client for built_by_bit_api
4+
All operations not tagged 'free' require an active [Ultimate](https://builtbybit.com/account/ultimate) subscription or invite-only permissions.
5+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
6+
7+
- API version: v2
8+
- Package version: v2
9+
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
10+
For more information, please visit [https://builtbybit.com/ticket](https://builtbybit.com/ticket)
11+
12+
## Installation
13+
14+
### For [Node.js](https://nodejs.org/)
15+
16+
#### npm
17+
18+
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).
19+
20+
Then install it via:
21+
22+
```shell
23+
npm install built_by_bit_api --save
24+
```
25+
26+
Finally, you need to build the module:
27+
28+
```shell
29+
npm run build
30+
```
31+
32+
##### Local development
33+
34+
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:
35+
36+
```shell
37+
npm install
38+
```
39+
40+
Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:
41+
42+
```shell
43+
npm link
44+
```
45+
46+
To use the link you just defined in your project, switch to the directory you want to use your built_by_bit_api from, and run:
47+
48+
```shell
49+
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
50+
```
51+
52+
Finally, you need to build the module:
53+
54+
```shell
55+
npm run build
56+
```
57+
58+
#### git
59+
60+
If the library is hosted at a git repository, e.g.https://github.com/BuiltByBit/api-wrapper-codegen-js
61+
then install it via:
62+
63+
```shell
64+
npm install BuiltByBit/api-wrapper-codegen-js --save
65+
```
66+
67+
### For browser
68+
69+
The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
70+
the above steps with Node.js and installing browserify with `npm install -g browserify`,
71+
perform the following (assuming *main.js* is your entry file):
72+
73+
```shell
74+
browserify main.js > bundle.js
75+
```
76+
77+
Then include *bundle.js* in the HTML pages.
78+
79+
### Webpack Configuration
80+
81+
Using Webpack you may encounter the following error: "Module not found: Error:
82+
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
83+
the following section to your webpack config:
84+
85+
```javascript
86+
module: {
87+
rules: [
88+
{
89+
parser: {
90+
amd: false
91+
}
92+
}
93+
]
94+
}
95+
```
96+
97+
## Getting Started
98+
99+
Please follow the [installation](#installation) instruction and execute the following JS code:
100+
101+
```javascript
102+
var BuiltByBitApi = require('built_by_bit_api');
103+
104+
105+
var api = new BuiltByBitApi.DefaultApi()
106+
var callback = function(error, data, response) {
107+
if (error) {
108+
console.error(error);
109+
} else {
110+
console.log('API called successfully. Returned data: ' + data);
111+
}
112+
};
113+
api.getV2Analytics(callback);
114+
115+
```
116+
117+
## Documentation for API Endpoints
118+
119+
All URIs are relative to *https://api.builtbybit.com*
120+
121+
Class | Method | HTTP request | Description
122+
------------ | ------------- | ------------- | -------------
123+
*BuiltByBitApi.DefaultApi* | [**getV2Analytics**](docs/DefaultApi.md#getV2Analytics) | **GET** /v2/analytics | Fetch a list of analytics definitions
124+
*BuiltByBitApi.DefaultApi* | [**getV2AnalyticsGraph**](docs/DefaultApi.md#getV2AnalyticsGraph) | **GET** /v2/analytics/graph | Fetch analytics graph data
125+
*BuiltByBitApi.DefaultApi* | [**getV2Events**](docs/DefaultApi.md#getV2Events) | **GET** /v2/events | Fetch a list of pending events
126+
*BuiltByBitApi.DefaultApi* | [**postV2EventsComplete**](docs/DefaultApi.md#postV2EventsComplete) | **POST** /v2/events/complete | Mark events as complete
127+
*BuiltByBitApi.DefaultApi* | [**postV2ResourcesCreatorUpdate**](docs/DefaultApi.md#postV2ResourcesCreatorUpdate) | **POST** /v2/resources/creator/update | Post a resource update
128+
*BuiltByBitApi.DiscoveryApi* | [**getResourcesDiscoverCategories**](docs/DiscoveryApi.md#getResourcesDiscoverCategories) | **GET** /v2/resources/discover/categories | Fetch a list of categories
129+
*BuiltByBitApi.DiscoveryApi* | [**getResourcesDiscoverResources**](docs/DiscoveryApi.md#getResourcesDiscoverResources) | **GET** /v2/resources/discover/resources | Fetch a list of resources
130+
*BuiltByBitApi.DiscoveryApi* | [**getV2ResourcesDiscoverCartView**](docs/DiscoveryApi.md#getV2ResourcesDiscoverCartView) | **GET** /v2/resources/discover/cart/view | View the user&#39;s cart items
131+
*BuiltByBitApi.DiscoveryApi* | [**getV2ResourcesDiscoverLicenses**](docs/DiscoveryApi.md#getV2ResourcesDiscoverLicenses) | **GET** /v2/resources/discover/licenses | Fetch a list of the user&#39;s licenses
132+
*BuiltByBitApi.DiscoveryApi* | [**postV2ResourcesDiscoverCartAdd**](docs/DiscoveryApi.md#postV2ResourcesDiscoverCartAdd) | **POST** /v2/resources/discover/cart/add | Add items to a user&#39;s cart
133+
*BuiltByBitApi.DiscoveryApi* | [**postV2ResourcesDiscoverCartCheckout**](docs/DiscoveryApi.md#postV2ResourcesDiscoverCartCheckout) | **POST** /v2/resources/discover/cart/checkout | Initiate a checkout of a user&#39;s cart
134+
*BuiltByBitApi.DiscoveryApi* | [**postV2ResourcesDiscoverCartCouponAdd**](docs/DiscoveryApi.md#postV2ResourcesDiscoverCartCouponAdd) | **POST** /v2/resources/discover/cart/coupon/add | Add a coupon to the user&#39;s cart
135+
*BuiltByBitApi.DiscoveryApi* | [**postV2ResourcesDiscoverCartCouponRemove**](docs/DiscoveryApi.md#postV2ResourcesDiscoverCartCouponRemove) | **POST** /v2/resources/discover/cart/coupon/remove | Remove a coupon from the user&#39;s cart
136+
*BuiltByBitApi.DiscoveryApi* | [**postV2ResourcesDiscoverCartRemove**](docs/DiscoveryApi.md#postV2ResourcesDiscoverCartRemove) | **POST** /v2/resources/discover/cart/remove | Remove an item from the user&#39;s cart
137+
*BuiltByBitApi.Oauth2Api* | [**getOauth2Token**](docs/Oauth2Api.md#getOauth2Token) | **POST** /oauth2/token | Request an access token using an existing grant
138+
*BuiltByBitApi.Oauth2Api* | [**getOauth2TokenRevoke**](docs/Oauth2Api.md#getOauth2TokenRevoke) | **POST** /oauth2/token/revoke | Revoke an existing access or refresh token
139+
140+
141+
## Documentation for Models
142+
143+
- [BuiltByBitApi.Addon](docs/Addon.md)
144+
- [BuiltByBitApi.Analytic](docs/Analytic.md)
145+
- [BuiltByBitApi.AnalyticGraphData](docs/AnalyticGraphData.md)
146+
- [BuiltByBitApi.AnalyticGraphDataPeriod](docs/AnalyticGraphDataPeriod.md)
147+
- [BuiltByBitApi.AnalyticGraphDataPoint](docs/AnalyticGraphDataPoint.md)
148+
- [BuiltByBitApi.CartItem](docs/CartItem.md)
149+
- [BuiltByBitApi.CartItemDiscountsInner](docs/CartItemDiscountsInner.md)
150+
- [BuiltByBitApi.CartSummary](docs/CartSummary.md)
151+
- [BuiltByBitApi.Category](docs/Category.md)
152+
- [BuiltByBitApi.Description](docs/Description.md)
153+
- [BuiltByBitApi.Event](docs/Event.md)
154+
- [BuiltByBitApi.Filter](docs/Filter.md)
155+
- [BuiltByBitApi.FilterChoice](docs/FilterChoice.md)
156+
- [BuiltByBitApi.FilterValue](docs/FilterValue.md)
157+
- [BuiltByBitApi.GetOauth2Token200Response](docs/GetOauth2Token200Response.md)
158+
- [BuiltByBitApi.GetOauth2TokenRevoke200Response](docs/GetOauth2TokenRevoke200Response.md)
159+
- [BuiltByBitApi.GetResourcesDiscoverCategories200Response](docs/GetResourcesDiscoverCategories200Response.md)
160+
- [BuiltByBitApi.GetResourcesDiscoverCategories200ResponseData](docs/GetResourcesDiscoverCategories200ResponseData.md)
161+
- [BuiltByBitApi.GetResourcesDiscoverResources200Response](docs/GetResourcesDiscoverResources200Response.md)
162+
- [BuiltByBitApi.GetResourcesDiscoverResources200ResponseData](docs/GetResourcesDiscoverResources200ResponseData.md)
163+
- [BuiltByBitApi.GetResourcesDiscoverResources4XXResponse](docs/GetResourcesDiscoverResources4XXResponse.md)
164+
- [BuiltByBitApi.GetResourcesDiscoverResources4XXResponseError](docs/GetResourcesDiscoverResources4XXResponseError.md)
165+
- [BuiltByBitApi.GetV2Analytics200Response](docs/GetV2Analytics200Response.md)
166+
- [BuiltByBitApi.GetV2Analytics200ResponseData](docs/GetV2Analytics200ResponseData.md)
167+
- [BuiltByBitApi.GetV2AnalyticsGraph200Response](docs/GetV2AnalyticsGraph200Response.md)
168+
- [BuiltByBitApi.GetV2Events200Response](docs/GetV2Events200Response.md)
169+
- [BuiltByBitApi.GetV2Events200ResponseData](docs/GetV2Events200ResponseData.md)
170+
- [BuiltByBitApi.GetV2ResourcesDiscoverCartView200Response](docs/GetV2ResourcesDiscoverCartView200Response.md)
171+
- [BuiltByBitApi.GetV2ResourcesDiscoverCartView200ResponseData](docs/GetV2ResourcesDiscoverCartView200ResponseData.md)
172+
- [BuiltByBitApi.GetV2ResourcesDiscoverLicenses200Response](docs/GetV2ResourcesDiscoverLicenses200Response.md)
173+
- [BuiltByBitApi.GetV2ResourcesDiscoverLicenses200ResponseData](docs/GetV2ResourcesDiscoverLicenses200ResponseData.md)
174+
- [BuiltByBitApi.License](docs/License.md)
175+
- [BuiltByBitApi.ListStats](docs/ListStats.md)
176+
- [BuiltByBitApi.Member](docs/Member.md)
177+
- [BuiltByBitApi.PostV2EventsComplete200Response](docs/PostV2EventsComplete200Response.md)
178+
- [BuiltByBitApi.PostV2EventsCompleteRequest](docs/PostV2EventsCompleteRequest.md)
179+
- [BuiltByBitApi.PostV2ResourcesCreatorUpdate200Response](docs/PostV2ResourcesCreatorUpdate200Response.md)
180+
- [BuiltByBitApi.PostV2ResourcesCreatorUpdate200ResponseData](docs/PostV2ResourcesCreatorUpdate200ResponseData.md)
181+
- [BuiltByBitApi.PostV2ResourcesCreatorUpdateRequest](docs/PostV2ResourcesCreatorUpdateRequest.md)
182+
- [BuiltByBitApi.PostV2ResourcesCreatorUpdateRequestFile](docs/PostV2ResourcesCreatorUpdateRequestFile.md)
183+
- [BuiltByBitApi.PostV2ResourcesCreatorUpdateRequestUpdate](docs/PostV2ResourcesCreatorUpdateRequestUpdate.md)
184+
- [BuiltByBitApi.PostV2ResourcesDiscoverCartAdd2XXResponse](docs/PostV2ResourcesDiscoverCartAdd2XXResponse.md)
185+
- [BuiltByBitApi.PostV2ResourcesDiscoverCartAddRequest](docs/PostV2ResourcesDiscoverCartAddRequest.md)
186+
- [BuiltByBitApi.PostV2ResourcesDiscoverCartCheckout200Response](docs/PostV2ResourcesDiscoverCartCheckout200Response.md)
187+
- [BuiltByBitApi.PostV2ResourcesDiscoverCartCheckout200ResponseData](docs/PostV2ResourcesDiscoverCartCheckout200ResponseData.md)
188+
- [BuiltByBitApi.PostV2ResourcesDiscoverCartCouponAdd200Response](docs/PostV2ResourcesDiscoverCartCouponAdd200Response.md)
189+
- [BuiltByBitApi.PostV2ResourcesDiscoverCartCouponAddRequest](docs/PostV2ResourcesDiscoverCartCouponAddRequest.md)
190+
- [BuiltByBitApi.PostV2ResourcesDiscoverCartCouponRemove200Response](docs/PostV2ResourcesDiscoverCartCouponRemove200Response.md)
191+
- [BuiltByBitApi.PostV2ResourcesDiscoverCartCouponRemoveRequest](docs/PostV2ResourcesDiscoverCartCouponRemoveRequest.md)
192+
- [BuiltByBitApi.PostV2ResourcesDiscoverCartRemove200Response](docs/PostV2ResourcesDiscoverCartRemove200Response.md)
193+
- [BuiltByBitApi.PostV2ResourcesDiscoverCartRemoveRequest](docs/PostV2ResourcesDiscoverCartRemoveRequest.md)
194+
- [BuiltByBitApi.Resource](docs/Resource.md)
195+
- [BuiltByBitApi.Review](docs/Review.md)
196+
- [BuiltByBitApi.SaleEvent](docs/SaleEvent.md)
197+
- [BuiltByBitApi.SaleEventEntry](docs/SaleEventEntry.md)
198+
- [BuiltByBitApi.Update](docs/Update.md)
199+
- [BuiltByBitApi.Version](docs/Version.md)
200+
201+
202+
## Documentation for Authorization
203+
204+
205+
Authentication schemes defined for the API:
206+
### token
207+
208+
209+
- **Type**: API key
210+
- **API key parameter name**: Authorization
211+
- **Location**: HTTP header
212+

docs/Addon.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# BuiltByBitApi.Addon
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**addonId** | **Number** | | [optional]
8+
**title** | **String** | | [optional]
9+
**description** | **String** | | [optional]
10+
**type** | **String** | | [optional]
11+
**state** | **String** | | [optional]
12+
**listPrice** | **Number** | | [optional]
13+
**listPriceFormatted** | **String** | | [optional]
14+
**finalPrice** | **Number** | | [optional]
15+
**finalPriceFormatted** | **String** | | [optional]
16+
**priceCurrency** | **String** | | [optional]
17+
**displayOrder** | **Number** | | [optional]
18+
**_default** | **Boolean** | | [optional]
19+
20+
21+
22+
## Enum: StateEnum
23+
24+
25+
* `visible` (value: `"visible"`)
26+
27+
* `disabled` (value: `"disabled"`)
28+
29+
30+
31+

docs/Analytic.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# BuiltByBitApi.Analytic
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**label** | **String** | | [optional]
8+
**desc** | **String** | | [optional]
9+
**graph** | **Boolean** | Whether or not this analytic can be requested via the /v2/analytics/graph endpoint. | [optional]
10+
**single** | **Boolean** | Whether or not this analytic can be requested via the /v2/analytics/single endpoint. | [optional]
11+
**filters** | **String** | | [optional]
12+
13+

docs/AnalyticGraphData.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# BuiltByBitApi.AnalyticGraphData
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**data** | [**{String: AnalyticGraphDataPoint}**](AnalyticGraphDataPoint.md) | | [optional]
8+
**grouping** | **String** | | [optional]
9+
**label** | **String** | | [optional]
10+
**period** | [**AnalyticGraphDataPeriod**](AnalyticGraphDataPeriod.md) | | [optional]
11+
12+

docs/AnalyticGraphDataPeriod.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# BuiltByBitApi.AnalyticGraphDataPeriod
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**period** | **String** | | [optional]
8+
**periodDisplay** | **String** | | [optional]
9+
**startDate** | **String** | | [optional]
10+
**endDate** | **String** | | [optional]
11+
12+

docs/AnalyticGraphDataPoint.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# BuiltByBitApi.AnalyticGraphDataPoint
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**label** | **String** | | [optional]
8+
**count** | **Number** | | [optional]
9+
**ts** | **Number** | | [optional]
10+
**days** | **Number** | | [optional]
11+
**values** | **{String: Number}** | | [optional]
12+
**averages** | **{String: Number}** | | [optional]
13+
14+

docs/CartItem.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# BuiltByBitApi.CartItem
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**cartItemId** | **String** | | [optional]
8+
**contentType** | **String** | | [optional]
9+
**contentId** | **Number** | | [optional]
10+
**contentTitle** | **String** | | [optional]
11+
**contentSummary** | **String** | | [optional]
12+
**contentCoverImageUrl** | **String** | | [optional]
13+
**listPrice** | **Number** | | [optional]
14+
**listPriceFormatted** | **String** | | [optional]
15+
**finalPrice** | **Number** | | [optional]
16+
**finalPriceFormatted** | **String** | | [optional]
17+
**discounts** | [**[CartItemDiscountsInner]**](CartItemDiscountsInner.md) | | [optional]
18+
19+

0 commit comments

Comments
 (0)