Skip to content

Commit ef79f42

Browse files
committed
Auto-generate wrapper from updated spec
1 parent 375e76c commit ef79f42

37 files changed

+8247
-705
lines changed

README.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,18 @@ $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('Au
5959
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
6060

6161

62-
$apiInstance = new OpenAPI\Client\Api\DefaultApi(
62+
$apiInstance = new OpenAPI\Client\Api\AnalyticsApi(
6363
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
6464
// This is optional, `GuzzleHttp\Client` will be used as default.
6565
new GuzzleHttp\Client(),
6666
$config
6767
);
6868

6969
try {
70-
$result = $apiInstance->getV2Health();
70+
$result = $apiInstance->getV2Analytics();
7171
print_r($result);
7272
} catch (Exception $e) {
73-
echo 'Exception when calling DefaultApi->getV2Health: ', $e->getMessage(), PHP_EOL;
73+
echo 'Exception when calling AnalyticsApi->getV2Analytics: ', $e->getMessage(), PHP_EOL;
7474
}
7575

7676
```
@@ -81,24 +81,26 @@ All URIs are relative to *https://api.builtbybit.com*
8181

8282
Class | Method | HTTP request | Description
8383
------------ | ------------- | ------------- | -------------
84-
*DefaultApi* | [**getV2Health**](docs/Api/DefaultApi.md#getv2health) | **GET** /v2/health | Retrieve a health status
85-
*DefaultApi* | [**getV2ResourcesCreatorCoupons**](docs/Api/DefaultApi.md#getv2resourcescreatorcoupons) | **GET** /v2/resources/creator/coupons | Fetch a list of your coupons
86-
*DefaultApi* | [**getV2ResourcesCreatorStores**](docs/Api/DefaultApi.md#getv2resourcescreatorstores) | **GET** /v2/resources/creator/stores | Fetch a list of your stores
87-
*GlobalApi* | [**getV2Analytics**](docs/Api/GlobalApi.md#getv2analytics) | **GET** /v2/analytics | Fetch a list of analytics definitions
88-
*GlobalApi* | [**getV2AnalyticsGraph**](docs/Api/GlobalApi.md#getv2analyticsgraph) | **GET** /v2/analytics/graph | Fetch analytics graph data
89-
*GlobalApi* | [**getV2AnalyticsSingle**](docs/Api/GlobalApi.md#getv2analyticssingle) | **GET** /v2/analytics/single | Fetch a single analytics value
90-
*GlobalApi* | [**getV2Events**](docs/Api/GlobalApi.md#getv2events) | **GET** /v2/events | Fetch a list of pending events
91-
*GlobalApi* | [**postV2EventsComplete**](docs/Api/GlobalApi.md#postv2eventscomplete) | **POST** /v2/events/complete | Mark events as complete
84+
*AnalyticsApi* | [**getV2Analytics**](docs/Api/AnalyticsApi.md#getv2analytics) | **GET** /v2/analytics | Fetch a list of analytics definitions
85+
*AnalyticsApi* | [**getV2AnalyticsGraph**](docs/Api/AnalyticsApi.md#getv2analyticsgraph) | **GET** /v2/analytics/graph | Fetch analytics graph data
86+
*AnalyticsApi* | [**getV2AnalyticsSingle**](docs/Api/AnalyticsApi.md#getv2analyticssingle) | **GET** /v2/analytics/single | Fetch a single analytics value
87+
*DefaultApi* | [**getV2ResourcesCreatorBatch**](docs/Api/DefaultApi.md#getv2resourcescreatorbatch) | **GET** /v2/resources/creator/batch | Fetch a list of your batches edits
88+
*DefaultApi* | [**postV2ResourcesCreatorBatch**](docs/Api/DefaultApi.md#postv2resourcescreatorbatch) | **POST** /v2/resources/creator/batch | Submit a new batch edit
89+
*EventsApi* | [**getV2Events**](docs/Api/EventsApi.md#getv2events) | **GET** /v2/events | Fetch a list of pending events
90+
*EventsApi* | [**postV2EventsComplete**](docs/Api/EventsApi.md#postv2eventscomplete) | **POST** /v2/events/complete | Mark events as complete
91+
*HealthApi* | [**getV2Health**](docs/Api/HealthApi.md#getv2health) | **GET** /v2/health | Retrieve a health status
9292
*Oauth2Api* | [**getOauth2Token**](docs/Api/Oauth2Api.md#getoauth2token) | **POST** /oauth2/token | Request an access token using an existing grant
9393
*Oauth2Api* | [**getOauth2TokenRevoke**](docs/Api/Oauth2Api.md#getoauth2tokenrevoke) | **POST** /oauth2/token/revoke | Revoke an existing access or refresh token
9494
*ResourcesBuyerApi* | [**getV2ResourcesBuyerLatest**](docs/Api/ResourcesBuyerApi.md#getv2resourcesbuyerlatest) | **GET** /v2/resources/buyer/latest | Fetches the latest versions & license information
9595
*ResourcesCreatorApi* | [**getV2ResourcesCreatorAddons**](docs/Api/ResourcesCreatorApi.md#getv2resourcescreatoraddons) | **GET** /v2/resources/creator/addons | Fetch a list of your resources' addons
9696
*ResourcesCreatorApi* | [**getV2ResourcesCreatorBundles**](docs/Api/ResourcesCreatorApi.md#getv2resourcescreatorbundles) | **GET** /v2/resources/creator/bundles | Fetch a list of your bundles
97+
*ResourcesCreatorApi* | [**getV2ResourcesCreatorCoupons**](docs/Api/ResourcesCreatorApi.md#getv2resourcescreatorcoupons) | **GET** /v2/resources/creator/coupons | Fetch a list of your coupons
9798
*ResourcesCreatorApi* | [**getV2ResourcesCreatorLicenses**](docs/Api/ResourcesCreatorApi.md#getv2resourcescreatorlicenses) | **GET** /v2/resources/creator/licenses | Fetch a list of your resources' licenses
9899
*ResourcesCreatorApi* | [**getV2ResourcesCreatorPurchases**](docs/Api/ResourcesCreatorApi.md#getv2resourcescreatorpurchases) | **GET** /v2/resources/creator/purchases | Fetch a list of your resources' purchases
99100
*ResourcesCreatorApi* | [**getV2ResourcesCreatorResources**](docs/Api/ResourcesCreatorApi.md#getv2resourcescreatorresources) | **GET** /v2/resources/creator/resources | Fetch a list of your resources
100101
*ResourcesCreatorApi* | [**getV2ResourcesCreatorReviews**](docs/Api/ResourcesCreatorApi.md#getv2resourcescreatorreviews) | **GET** /v2/resources/creator/reviews | Fetch a list of your resources' reviews
101102
*ResourcesCreatorApi* | [**getV2ResourcesCreatorSaleEvents**](docs/Api/ResourcesCreatorApi.md#getv2resourcescreatorsaleevents) | **GET** /v2/resources/creator/sale-events | Fetch a list of your sale events
103+
*ResourcesCreatorApi* | [**getV2ResourcesCreatorStores**](docs/Api/ResourcesCreatorApi.md#getv2resourcescreatorstores) | **GET** /v2/resources/creator/stores | Fetch a list of your stores
102104
*ResourcesCreatorApi* | [**getV2ResourcesCreatorUpdates**](docs/Api/ResourcesCreatorApi.md#getv2resourcescreatorupdates) | **GET** /v2/resources/creator/updates | Fetch a list of your resource's updates
103105
*ResourcesCreatorApi* | [**getV2ResourcesCreatorVersions**](docs/Api/ResourcesCreatorApi.md#getv2resourcescreatorversions) | **GET** /v2/resources/creator/versions | Fetch a list of your resources' versions
104106
*ResourcesCreatorApi* | [**postV2ResourcesCreatorUpdate**](docs/Api/ResourcesCreatorApi.md#postv2resourcescreatorupdate) | **POST** /v2/resources/creator/update | Post a resource update
@@ -120,6 +122,7 @@ Class | Method | HTTP request | Description
120122
- [AnalyticGraphData](docs/Model/AnalyticGraphData.md)
121123
- [AnalyticGraphDataPeriod](docs/Model/AnalyticGraphDataPeriod.md)
122124
- [AnalyticGraphDataPoint](docs/Model/AnalyticGraphDataPoint.md)
125+
- [Batch](docs/Model/Batch.md)
123126
- [Bundle](docs/Model/Bundle.md)
124127
- [CartItem](docs/Model/CartItem.md)
125128
- [CartItemDiscountsInner](docs/Model/CartItemDiscountsInner.md)
@@ -151,6 +154,8 @@ Class | Method | HTTP request | Description
151154
- [GetV2ResourcesBuyerLatest200ResponseData](docs/Model/GetV2ResourcesBuyerLatest200ResponseData.md)
152155
- [GetV2ResourcesCreatorAddons200Response](docs/Model/GetV2ResourcesCreatorAddons200Response.md)
153156
- [GetV2ResourcesCreatorAddons200ResponseData](docs/Model/GetV2ResourcesCreatorAddons200ResponseData.md)
157+
- [GetV2ResourcesCreatorBatch200Response](docs/Model/GetV2ResourcesCreatorBatch200Response.md)
158+
- [GetV2ResourcesCreatorBatch200ResponseData](docs/Model/GetV2ResourcesCreatorBatch200ResponseData.md)
154159
- [GetV2ResourcesCreatorBundles200Response](docs/Model/GetV2ResourcesCreatorBundles200Response.md)
155160
- [GetV2ResourcesCreatorBundles200ResponseData](docs/Model/GetV2ResourcesCreatorBundles200ResponseData.md)
156161
- [GetV2ResourcesCreatorCoupons200Response](docs/Model/GetV2ResourcesCreatorCoupons200Response.md)
@@ -180,6 +185,10 @@ Class | Method | HTTP request | Description
180185
- [Member](docs/Model/Member.md)
181186
- [PostV2EventsComplete200Response](docs/Model/PostV2EventsComplete200Response.md)
182187
- [PostV2EventsCompleteRequest](docs/Model/PostV2EventsCompleteRequest.md)
188+
- [PostV2ResourcesCreatorBatch200Response](docs/Model/PostV2ResourcesCreatorBatch200Response.md)
189+
- [PostV2ResourcesCreatorBatch200ResponseData](docs/Model/PostV2ResourcesCreatorBatch200ResponseData.md)
190+
- [PostV2ResourcesCreatorBatchRequest](docs/Model/PostV2ResourcesCreatorBatchRequest.md)
191+
- [PostV2ResourcesCreatorBatchRequestChangesInner](docs/Model/PostV2ResourcesCreatorBatchRequestChangesInner.md)
183192
- [PostV2ResourcesCreatorUpdate200Response](docs/Model/PostV2ResourcesCreatorUpdate200Response.md)
184193
- [PostV2ResourcesCreatorUpdate200ResponseData](docs/Model/PostV2ResourcesCreatorUpdate200ResponseData.md)
185194
- [PostV2ResourcesCreatorUpdateRequest](docs/Model/PostV2ResourcesCreatorUpdateRequest.md)

docs/Api/AnalyticsApi.md

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
# OpenAPI\Client\AnalyticsApi
2+
3+
All URIs are relative to https://api.builtbybit.com, except if the operation defines another base path.
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+
## `getV2Analytics()`
13+
14+
```php
15+
getV2Analytics(): \OpenAPI\Client\Model\GetV2Analytics200Response
16+
```
17+
18+
Fetch a list of analytics definitions
19+
20+
### Example
21+
22+
```php
23+
<?php
24+
require_once(__DIR__ . '/vendor/autoload.php');
25+
26+
27+
// Configure API key authorization: token
28+
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
29+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
30+
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
31+
32+
33+
$apiInstance = new OpenAPI\Client\Api\AnalyticsApi(
34+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
35+
// This is optional, `GuzzleHttp\Client` will be used as default.
36+
new GuzzleHttp\Client(),
37+
$config
38+
);
39+
40+
try {
41+
$result = $apiInstance->getV2Analytics();
42+
print_r($result);
43+
} catch (Exception $e) {
44+
echo 'Exception when calling AnalyticsApi->getV2Analytics: ', $e->getMessage(), PHP_EOL;
45+
}
46+
```
47+
48+
### Parameters
49+
50+
This endpoint does not need any parameter.
51+
52+
### Return type
53+
54+
[**\OpenAPI\Client\Model\GetV2Analytics200Response**](../Model/GetV2Analytics200Response.md)
55+
56+
### Authorization
57+
58+
[token](../../README.md#token)
59+
60+
### HTTP request headers
61+
62+
- **Content-Type**: Not defined
63+
- **Accept**: `application/json`
64+
65+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
66+
[[Back to Model list]](../../README.md#models)
67+
[[Back to README]](../../README.md)
68+
69+
## `getV2AnalyticsGraph()`
70+
71+
```php
72+
getV2AnalyticsGraph($analytics, $period, $filters, $start_date, $end_date): \OpenAPI\Client\Model\GetV2AnalyticsGraph200Response
73+
```
74+
75+
Fetch analytics graph data
76+
77+
### Example
78+
79+
```php
80+
<?php
81+
require_once(__DIR__ . '/vendor/autoload.php');
82+
83+
84+
// Configure API key authorization: token
85+
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
86+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
87+
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
88+
89+
90+
$apiInstance = new OpenAPI\Client\Api\AnalyticsApi(
91+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
92+
// This is optional, `GuzzleHttp\Client` will be used as default.
93+
new GuzzleHttp\Client(),
94+
$config
95+
);
96+
$analytics = NULL; // array | A list of analytic IDs to fetch data for.
97+
$period = 'period_example'; // string | The time period to fetch data over.
98+
$filters = NULL; // array | A set of filters which may be used for the analytics.
99+
$start_date = 'start_date_example'; // string | Only respected when 'period' = 'custom_range', in the format 'YYYY-MM-DD'.
100+
$end_date = 'end_date_example'; // string | Only respected when 'period' = 'custom_range', in the format 'YYYY-MM-DD'.
101+
102+
try {
103+
$result = $apiInstance->getV2AnalyticsGraph($analytics, $period, $filters, $start_date, $end_date);
104+
print_r($result);
105+
} catch (Exception $e) {
106+
echo 'Exception when calling AnalyticsApi->getV2AnalyticsGraph: ', $e->getMessage(), PHP_EOL;
107+
}
108+
```
109+
110+
### Parameters
111+
112+
| Name | Type | Description | Notes |
113+
| ------------- | ------------- | ------------- | ------------- |
114+
| **analytics** | [**array**](../Model/.md)| A list of analytic IDs to fetch data for. | [optional] |
115+
| **period** | **string**| The time period to fetch data over. | [optional] |
116+
| **filters** | [**array**](../Model/.md)| A set of filters which may be used for the analytics. | [optional] |
117+
| **start_date** | **string**| Only respected when &#39;period&#39; &#x3D; &#39;custom_range&#39;, in the format &#39;YYYY-MM-DD&#39;. | [optional] |
118+
| **end_date** | **string**| Only respected when &#39;period&#39; &#x3D; &#39;custom_range&#39;, in the format &#39;YYYY-MM-DD&#39;. | [optional] |
119+
120+
### Return type
121+
122+
[**\OpenAPI\Client\Model\GetV2AnalyticsGraph200Response**](../Model/GetV2AnalyticsGraph200Response.md)
123+
124+
### Authorization
125+
126+
[token](../../README.md#token)
127+
128+
### HTTP request headers
129+
130+
- **Content-Type**: Not defined
131+
- **Accept**: `application/json`
132+
133+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
134+
[[Back to Model list]](../../README.md#models)
135+
[[Back to README]](../../README.md)
136+
137+
## `getV2AnalyticsSingle()`
138+
139+
```php
140+
getV2AnalyticsSingle($analytics, $period, $filters, $start_date, $end_date): \OpenAPI\Client\Model\GetV2AnalyticsSingle200Response
141+
```
142+
143+
Fetch a single analytics value
144+
145+
### Example
146+
147+
```php
148+
<?php
149+
require_once(__DIR__ . '/vendor/autoload.php');
150+
151+
152+
// Configure API key authorization: token
153+
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
154+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
155+
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
156+
157+
158+
$apiInstance = new OpenAPI\Client\Api\AnalyticsApi(
159+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
160+
// This is optional, `GuzzleHttp\Client` will be used as default.
161+
new GuzzleHttp\Client(),
162+
$config
163+
);
164+
$analytics = NULL; // array | A list of analytic IDs to fetch data for.
165+
$period = 'period_example'; // string | The time period to fetch data over.
166+
$filters = NULL; // array | A set of filters which may be used for the analytics.
167+
$start_date = 'start_date_example'; // string | Only respected when 'period' = 'custom_range', in the format 'YYYY-MM-DD'.
168+
$end_date = 'end_date_example'; // string | Only respected when 'period' = 'custom_range', in the format 'YYYY-MM-DD'.
169+
170+
try {
171+
$result = $apiInstance->getV2AnalyticsSingle($analytics, $period, $filters, $start_date, $end_date);
172+
print_r($result);
173+
} catch (Exception $e) {
174+
echo 'Exception when calling AnalyticsApi->getV2AnalyticsSingle: ', $e->getMessage(), PHP_EOL;
175+
}
176+
```
177+
178+
### Parameters
179+
180+
| Name | Type | Description | Notes |
181+
| ------------- | ------------- | ------------- | ------------- |
182+
| **analytics** | [**array**](../Model/.md)| A list of analytic IDs to fetch data for. | [optional] |
183+
| **period** | **string**| The time period to fetch data over. | [optional] |
184+
| **filters** | [**array**](../Model/.md)| A set of filters which may be used for the analytics. | [optional] |
185+
| **start_date** | **string**| Only respected when &#39;period&#39; &#x3D; &#39;custom_range&#39;, in the format &#39;YYYY-MM-DD&#39;. | [optional] |
186+
| **end_date** | **string**| Only respected when &#39;period&#39; &#x3D; &#39;custom_range&#39;, in the format &#39;YYYY-MM-DD&#39;. | [optional] |
187+
188+
### Return type
189+
190+
[**\OpenAPI\Client\Model\GetV2AnalyticsSingle200Response**](../Model/GetV2AnalyticsSingle200Response.md)
191+
192+
### Authorization
193+
194+
[token](../../README.md#token)
195+
196+
### HTTP request headers
197+
198+
- **Content-Type**: Not defined
199+
- **Accept**: `application/json`
200+
201+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
202+
[[Back to Model list]](../../README.md#models)
203+
[[Back to README]](../../README.md)

0 commit comments

Comments
 (0)