Skip to content

Commit 1107a9a

Browse files
committed
Auto-generate wrapper from updated spec
1 parent 497c708 commit 1107a9a

38 files changed

Lines changed: 2645 additions & 150 deletions

README.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@ token.apiKey = "YOUR API KEY"
111111
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
112112
//token.apiKeyPrefix['Authorization'] = "Token"
113113

114-
var api = new BuiltByBitApi.DefaultApi()
114+
var api = new BuiltByBitApi.AnalyticsApi()
115115
var callback = function(error, data, response) {
116116
if (error) {
117117
console.error(error);
118118
} else {
119119
console.log('API called successfully. Returned data: ' + data);
120120
}
121121
};
122-
api.getV2Health(callback);
122+
api.getV2Analytics(callback);
123123

124124
```
125125

@@ -129,24 +129,26 @@ All URIs are relative to *https://api.builtbybit.com*
129129

130130
Class | Method | HTTP request | Description
131131
------------ | ------------- | ------------- | -------------
132-
*BuiltByBitApi.DefaultApi* | [**getV2Health**](docs/DefaultApi.md#getV2Health) | **GET** /v2/health | Retrieve a health status
133-
*BuiltByBitApi.DefaultApi* | [**getV2ResourcesCreatorCoupons**](docs/DefaultApi.md#getV2ResourcesCreatorCoupons) | **GET** /v2/resources/creator/coupons | Fetch a list of your coupons
134-
*BuiltByBitApi.DefaultApi* | [**getV2ResourcesCreatorStores**](docs/DefaultApi.md#getV2ResourcesCreatorStores) | **GET** /v2/resources/creator/stores | Fetch a list of your stores
135-
*BuiltByBitApi.GlobalApi* | [**getV2Analytics**](docs/GlobalApi.md#getV2Analytics) | **GET** /v2/analytics | Fetch a list of analytics definitions
136-
*BuiltByBitApi.GlobalApi* | [**getV2AnalyticsGraph**](docs/GlobalApi.md#getV2AnalyticsGraph) | **GET** /v2/analytics/graph | Fetch analytics graph data
137-
*BuiltByBitApi.GlobalApi* | [**getV2AnalyticsSingle**](docs/GlobalApi.md#getV2AnalyticsSingle) | **GET** /v2/analytics/single | Fetch a single analytics value
138-
*BuiltByBitApi.GlobalApi* | [**getV2Events**](docs/GlobalApi.md#getV2Events) | **GET** /v2/events | Fetch a list of pending events
139-
*BuiltByBitApi.GlobalApi* | [**postV2EventsComplete**](docs/GlobalApi.md#postV2EventsComplete) | **POST** /v2/events/complete | Mark events as complete
132+
*BuiltByBitApi.AnalyticsApi* | [**getV2Analytics**](docs/AnalyticsApi.md#getV2Analytics) | **GET** /v2/analytics | Fetch a list of analytics definitions
133+
*BuiltByBitApi.AnalyticsApi* | [**getV2AnalyticsGraph**](docs/AnalyticsApi.md#getV2AnalyticsGraph) | **GET** /v2/analytics/graph | Fetch analytics graph data
134+
*BuiltByBitApi.AnalyticsApi* | [**getV2AnalyticsSingle**](docs/AnalyticsApi.md#getV2AnalyticsSingle) | **GET** /v2/analytics/single | Fetch a single analytics value
135+
*BuiltByBitApi.DefaultApi* | [**getV2ResourcesCreatorBatch**](docs/DefaultApi.md#getV2ResourcesCreatorBatch) | **GET** /v2/resources/creator/batch | Fetch a list of your batches edits
136+
*BuiltByBitApi.DefaultApi* | [**postV2ResourcesCreatorBatch**](docs/DefaultApi.md#postV2ResourcesCreatorBatch) | **POST** /v2/resources/creator/batch | Submit a new batch edit
137+
*BuiltByBitApi.EventsApi* | [**getV2Events**](docs/EventsApi.md#getV2Events) | **GET** /v2/events | Fetch a list of pending events
138+
*BuiltByBitApi.EventsApi* | [**postV2EventsComplete**](docs/EventsApi.md#postV2EventsComplete) | **POST** /v2/events/complete | Mark events as complete
139+
*BuiltByBitApi.HealthApi* | [**getV2Health**](docs/HealthApi.md#getV2Health) | **GET** /v2/health | Retrieve a health status
140140
*BuiltByBitApi.Oauth2Api* | [**getOauth2Token**](docs/Oauth2Api.md#getOauth2Token) | **POST** /oauth2/token | Request an access token using an existing grant
141141
*BuiltByBitApi.Oauth2Api* | [**getOauth2TokenRevoke**](docs/Oauth2Api.md#getOauth2TokenRevoke) | **POST** /oauth2/token/revoke | Revoke an existing access or refresh token
142142
*BuiltByBitApi.ResourcesBuyerApi* | [**getV2ResourcesBuyerLatest**](docs/ResourcesBuyerApi.md#getV2ResourcesBuyerLatest) | **GET** /v2/resources/buyer/latest | Fetches the latest versions & license information
143143
*BuiltByBitApi.ResourcesCreatorApi* | [**getV2ResourcesCreatorAddons**](docs/ResourcesCreatorApi.md#getV2ResourcesCreatorAddons) | **GET** /v2/resources/creator/addons | Fetch a list of your resources' addons
144144
*BuiltByBitApi.ResourcesCreatorApi* | [**getV2ResourcesCreatorBundles**](docs/ResourcesCreatorApi.md#getV2ResourcesCreatorBundles) | **GET** /v2/resources/creator/bundles | Fetch a list of your bundles
145+
*BuiltByBitApi.ResourcesCreatorApi* | [**getV2ResourcesCreatorCoupons**](docs/ResourcesCreatorApi.md#getV2ResourcesCreatorCoupons) | **GET** /v2/resources/creator/coupons | Fetch a list of your coupons
145146
*BuiltByBitApi.ResourcesCreatorApi* | [**getV2ResourcesCreatorLicenses**](docs/ResourcesCreatorApi.md#getV2ResourcesCreatorLicenses) | **GET** /v2/resources/creator/licenses | Fetch a list of your resources' licenses
146147
*BuiltByBitApi.ResourcesCreatorApi* | [**getV2ResourcesCreatorPurchases**](docs/ResourcesCreatorApi.md#getV2ResourcesCreatorPurchases) | **GET** /v2/resources/creator/purchases | Fetch a list of your resources' purchases
147148
*BuiltByBitApi.ResourcesCreatorApi* | [**getV2ResourcesCreatorResources**](docs/ResourcesCreatorApi.md#getV2ResourcesCreatorResources) | **GET** /v2/resources/creator/resources | Fetch a list of your resources
148149
*BuiltByBitApi.ResourcesCreatorApi* | [**getV2ResourcesCreatorReviews**](docs/ResourcesCreatorApi.md#getV2ResourcesCreatorReviews) | **GET** /v2/resources/creator/reviews | Fetch a list of your resources' reviews
149150
*BuiltByBitApi.ResourcesCreatorApi* | [**getV2ResourcesCreatorSaleEvents**](docs/ResourcesCreatorApi.md#getV2ResourcesCreatorSaleEvents) | **GET** /v2/resources/creator/sale-events | Fetch a list of your sale events
151+
*BuiltByBitApi.ResourcesCreatorApi* | [**getV2ResourcesCreatorStores**](docs/ResourcesCreatorApi.md#getV2ResourcesCreatorStores) | **GET** /v2/resources/creator/stores | Fetch a list of your stores
150152
*BuiltByBitApi.ResourcesCreatorApi* | [**getV2ResourcesCreatorUpdates**](docs/ResourcesCreatorApi.md#getV2ResourcesCreatorUpdates) | **GET** /v2/resources/creator/updates | Fetch a list of your resource's updates
151153
*BuiltByBitApi.ResourcesCreatorApi* | [**getV2ResourcesCreatorVersions**](docs/ResourcesCreatorApi.md#getV2ResourcesCreatorVersions) | **GET** /v2/resources/creator/versions | Fetch a list of your resources' versions
152154
*BuiltByBitApi.ResourcesCreatorApi* | [**postV2ResourcesCreatorUpdate**](docs/ResourcesCreatorApi.md#postV2ResourcesCreatorUpdate) | **POST** /v2/resources/creator/update | Post a resource update
@@ -169,6 +171,7 @@ Class | Method | HTTP request | Description
169171
- [BuiltByBitApi.AnalyticGraphData](docs/AnalyticGraphData.md)
170172
- [BuiltByBitApi.AnalyticGraphDataPeriod](docs/AnalyticGraphDataPeriod.md)
171173
- [BuiltByBitApi.AnalyticGraphDataPoint](docs/AnalyticGraphDataPoint.md)
174+
- [BuiltByBitApi.Batch](docs/Batch.md)
172175
- [BuiltByBitApi.Bundle](docs/Bundle.md)
173176
- [BuiltByBitApi.CartItem](docs/CartItem.md)
174177
- [BuiltByBitApi.CartItemDiscountsInner](docs/CartItemDiscountsInner.md)
@@ -200,6 +203,8 @@ Class | Method | HTTP request | Description
200203
- [BuiltByBitApi.GetV2ResourcesBuyerLatest200ResponseData](docs/GetV2ResourcesBuyerLatest200ResponseData.md)
201204
- [BuiltByBitApi.GetV2ResourcesCreatorAddons200Response](docs/GetV2ResourcesCreatorAddons200Response.md)
202205
- [BuiltByBitApi.GetV2ResourcesCreatorAddons200ResponseData](docs/GetV2ResourcesCreatorAddons200ResponseData.md)
206+
- [BuiltByBitApi.GetV2ResourcesCreatorBatch200Response](docs/GetV2ResourcesCreatorBatch200Response.md)
207+
- [BuiltByBitApi.GetV2ResourcesCreatorBatch200ResponseData](docs/GetV2ResourcesCreatorBatch200ResponseData.md)
203208
- [BuiltByBitApi.GetV2ResourcesCreatorBundles200Response](docs/GetV2ResourcesCreatorBundles200Response.md)
204209
- [BuiltByBitApi.GetV2ResourcesCreatorBundles200ResponseData](docs/GetV2ResourcesCreatorBundles200ResponseData.md)
205210
- [BuiltByBitApi.GetV2ResourcesCreatorCoupons200Response](docs/GetV2ResourcesCreatorCoupons200Response.md)
@@ -229,6 +234,10 @@ Class | Method | HTTP request | Description
229234
- [BuiltByBitApi.Member](docs/Member.md)
230235
- [BuiltByBitApi.PostV2EventsComplete200Response](docs/PostV2EventsComplete200Response.md)
231236
- [BuiltByBitApi.PostV2EventsCompleteRequest](docs/PostV2EventsCompleteRequest.md)
237+
- [BuiltByBitApi.PostV2ResourcesCreatorBatch200Response](docs/PostV2ResourcesCreatorBatch200Response.md)
238+
- [BuiltByBitApi.PostV2ResourcesCreatorBatch200ResponseData](docs/PostV2ResourcesCreatorBatch200ResponseData.md)
239+
- [BuiltByBitApi.PostV2ResourcesCreatorBatchRequest](docs/PostV2ResourcesCreatorBatchRequest.md)
240+
- [BuiltByBitApi.PostV2ResourcesCreatorBatchRequestChangesInner](docs/PostV2ResourcesCreatorBatchRequestChangesInner.md)
232241
- [BuiltByBitApi.PostV2ResourcesCreatorUpdate200Response](docs/PostV2ResourcesCreatorUpdate200Response.md)
233242
- [BuiltByBitApi.PostV2ResourcesCreatorUpdate200ResponseData](docs/PostV2ResourcesCreatorUpdate200ResponseData.md)
234243
- [BuiltByBitApi.PostV2ResourcesCreatorUpdateRequest](docs/PostV2ResourcesCreatorUpdateRequest.md)

docs/AnalyticGraphDataPoint.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ Name | Type | Description | Notes
99
**ts** | **Number** | | [optional]
1010
**days** | **Number** | | [optional]
1111
**values** | **{String: Number}** | | [optional]
12-
**averages** | **{String: Number}** | | [optional]
1312

1413

docs/AnalyticsApi.md

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
# BuiltByBitApi.AnalyticsApi
2+
3+
All URIs are relative to *https://api.builtbybit.com*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**getV2Analytics**](AnalyticsApi.md#getV2Analytics) | **GET** /v2/analytics | Fetch a list of analytics definitions
8+
[**getV2AnalyticsGraph**](AnalyticsApi.md#getV2AnalyticsGraph) | **GET** /v2/analytics/graph | Fetch analytics graph data
9+
[**getV2AnalyticsSingle**](AnalyticsApi.md#getV2AnalyticsSingle) | **GET** /v2/analytics/single | Fetch a single analytics value
10+
11+
12+
13+
## getV2Analytics
14+
15+
> GetV2Analytics200Response getV2Analytics()
16+
17+
Fetch a list of analytics definitions
18+
19+
### Example
20+
21+
```javascript
22+
import BuiltByBitApi from 'built_by_bit_api';
23+
let defaultClient = BuiltByBitApi.ApiClient.instance;
24+
// Configure API key authorization: token
25+
let token = defaultClient.authentications['token'];
26+
token.apiKey = 'YOUR API KEY';
27+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
28+
//token.apiKeyPrefix = 'Token';
29+
30+
let apiInstance = new BuiltByBitApi.AnalyticsApi();
31+
apiInstance.getV2Analytics((error, data, response) => {
32+
if (error) {
33+
console.error(error);
34+
} else {
35+
console.log('API called successfully. Returned data: ' + data);
36+
}
37+
});
38+
```
39+
40+
### Parameters
41+
42+
This endpoint does not need any parameter.
43+
44+
### Return type
45+
46+
[**GetV2Analytics200Response**](GetV2Analytics200Response.md)
47+
48+
### Authorization
49+
50+
[token](../README.md#token)
51+
52+
### HTTP request headers
53+
54+
- **Content-Type**: Not defined
55+
- **Accept**: application/json
56+
57+
58+
## getV2AnalyticsGraph
59+
60+
> GetV2AnalyticsGraph200Response getV2AnalyticsGraph(opts)
61+
62+
Fetch analytics graph data
63+
64+
### Example
65+
66+
```javascript
67+
import BuiltByBitApi from 'built_by_bit_api';
68+
let defaultClient = BuiltByBitApi.ApiClient.instance;
69+
// Configure API key authorization: token
70+
let token = defaultClient.authentications['token'];
71+
token.apiKey = 'YOUR API KEY';
72+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
73+
//token.apiKeyPrefix = 'Token';
74+
75+
let apiInstance = new BuiltByBitApi.AnalyticsApi();
76+
let opts = {
77+
'analytics': null, // Array | A list of analytic IDs to fetch data for.
78+
'period': "period_example", // String | The time period to fetch data over.
79+
'filters': null, // Array | A set of filters which may be used for the analytics.
80+
'startDate': "startDate_example", // String | Only respected when 'period' = 'custom_range', in the format 'YYYY-MM-DD'.
81+
'endDate': "endDate_example" // String | Only respected when 'period' = 'custom_range', in the format 'YYYY-MM-DD'.
82+
};
83+
apiInstance.getV2AnalyticsGraph(opts, (error, data, response) => {
84+
if (error) {
85+
console.error(error);
86+
} else {
87+
console.log('API called successfully. Returned data: ' + data);
88+
}
89+
});
90+
```
91+
92+
### Parameters
93+
94+
95+
Name | Type | Description | Notes
96+
------------- | ------------- | ------------- | -------------
97+
**analytics** | [**Array**](.md)| A list of analytic IDs to fetch data for. | [optional]
98+
**period** | **String**| The time period to fetch data over. | [optional]
99+
**filters** | [**Array**](.md)| A set of filters which may be used for the analytics. | [optional]
100+
**startDate** | **String**| Only respected when 'period' = 'custom_range', in the format 'YYYY-MM-DD'. | [optional]
101+
**endDate** | **String**| Only respected when 'period' = 'custom_range', in the format 'YYYY-MM-DD'. | [optional]
102+
103+
### Return type
104+
105+
[**GetV2AnalyticsGraph200Response**](GetV2AnalyticsGraph200Response.md)
106+
107+
### Authorization
108+
109+
[token](../README.md#token)
110+
111+
### HTTP request headers
112+
113+
- **Content-Type**: Not defined
114+
- **Accept**: application/json
115+
116+
117+
## getV2AnalyticsSingle
118+
119+
> GetV2AnalyticsSingle200Response getV2AnalyticsSingle(opts)
120+
121+
Fetch a single analytics value
122+
123+
### Example
124+
125+
```javascript
126+
import BuiltByBitApi from 'built_by_bit_api';
127+
let defaultClient = BuiltByBitApi.ApiClient.instance;
128+
// Configure API key authorization: token
129+
let token = defaultClient.authentications['token'];
130+
token.apiKey = 'YOUR API KEY';
131+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
132+
//token.apiKeyPrefix = 'Token';
133+
134+
let apiInstance = new BuiltByBitApi.AnalyticsApi();
135+
let opts = {
136+
'analytics': null, // Array | A list of analytic IDs to fetch data for.
137+
'period': "period_example", // String | The time period to fetch data over.
138+
'filters': null, // Array | A set of filters which may be used for the analytics.
139+
'startDate': "startDate_example", // String | Only respected when 'period' = 'custom_range', in the format 'YYYY-MM-DD'.
140+
'endDate': "endDate_example" // String | Only respected when 'period' = 'custom_range', in the format 'YYYY-MM-DD'.
141+
};
142+
apiInstance.getV2AnalyticsSingle(opts, (error, data, response) => {
143+
if (error) {
144+
console.error(error);
145+
} else {
146+
console.log('API called successfully. Returned data: ' + data);
147+
}
148+
});
149+
```
150+
151+
### Parameters
152+
153+
154+
Name | Type | Description | Notes
155+
------------- | ------------- | ------------- | -------------
156+
**analytics** | [**Array**](.md)| A list of analytic IDs to fetch data for. | [optional]
157+
**period** | **String**| The time period to fetch data over. | [optional]
158+
**filters** | [**Array**](.md)| A set of filters which may be used for the analytics. | [optional]
159+
**startDate** | **String**| Only respected when 'period' = 'custom_range', in the format 'YYYY-MM-DD'. | [optional]
160+
**endDate** | **String**| Only respected when 'period' = 'custom_range', in the format 'YYYY-MM-DD'. | [optional]
161+
162+
### Return type
163+
164+
[**GetV2AnalyticsSingle200Response**](GetV2AnalyticsSingle200Response.md)
165+
166+
### Authorization
167+
168+
[token](../README.md#token)
169+
170+
### HTTP request headers
171+
172+
- **Content-Type**: Not defined
173+
- **Accept**: application/json
174+

docs/Batch.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# BuiltByBitApi.Batch
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**batchId** | **Number** | | [optional]
8+
**userId** | **Number** | | [optional]
9+
**errors** | **{String: [String]}** | | [optional]
10+
**data** | **String** | | [optional]
11+
**createdAt** | **Number** | | [optional]
12+
**completedAt** | **Number** | | [optional]
13+
14+

0 commit comments

Comments
 (0)