|
| 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's cart items |
| 131 | +*BuiltByBitApi.DiscoveryApi* | [**getV2ResourcesDiscoverLicenses**](docs/DiscoveryApi.md#getV2ResourcesDiscoverLicenses) | **GET** /v2/resources/discover/licenses | Fetch a list of the user's licenses |
| 132 | +*BuiltByBitApi.DiscoveryApi* | [**postV2ResourcesDiscoverCartAdd**](docs/DiscoveryApi.md#postV2ResourcesDiscoverCartAdd) | **POST** /v2/resources/discover/cart/add | Add items to a user's cart |
| 133 | +*BuiltByBitApi.DiscoveryApi* | [**postV2ResourcesDiscoverCartCheckout**](docs/DiscoveryApi.md#postV2ResourcesDiscoverCartCheckout) | **POST** /v2/resources/discover/cart/checkout | Initiate a checkout of a user's cart |
| 134 | +*BuiltByBitApi.DiscoveryApi* | [**postV2ResourcesDiscoverCartCouponAdd**](docs/DiscoveryApi.md#postV2ResourcesDiscoverCartCouponAdd) | **POST** /v2/resources/discover/cart/coupon/add | Add a coupon to the user's cart |
| 135 | +*BuiltByBitApi.DiscoveryApi* | [**postV2ResourcesDiscoverCartCouponRemove**](docs/DiscoveryApi.md#postV2ResourcesDiscoverCartCouponRemove) | **POST** /v2/resources/discover/cart/coupon/remove | Remove a coupon from the user's cart |
| 136 | +*BuiltByBitApi.DiscoveryApi* | [**postV2ResourcesDiscoverCartRemove**](docs/DiscoveryApi.md#postV2ResourcesDiscoverCartRemove) | **POST** /v2/resources/discover/cart/remove | Remove an item from the user'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 | + |
0 commit comments