Skip to content

Commit c9deeec

Browse files
committed
Auto-generate wrapper from updated spec
1 parent 073a412 commit c9deeec

File tree

90 files changed

+9116
-131
lines changed

Some content is hidden

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

90 files changed

+9116
-131
lines changed

README.md

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# builtbybit/api-wrapper-codegen-php
22

3-
All operations not tagged 'free' require an active [Ultimate](https://builtbybit.com/account/ultimate) subscription or invite-only permissions.
3+
All operations not tagged 'free' require an active [Ultimate](https://builtbybit.com/account/ultimate) subscription or invite-only permissions.
4+
5+
V2 documentation: https://builtbybit.com/wiki/api-v2/ \\
6+
OAuth2 documentation: https://builtbybit.com/wiki/oauth2/
47

58
For more information, please visit [https://builtbybit.com/ticket](https://builtbybit.com/ticket).
69

@@ -50,18 +53,24 @@ require_once(__DIR__ . '/vendor/autoload.php');
5053

5154

5255

56+
// Configure API key authorization: token
57+
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
58+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
59+
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
5360

54-
$apiInstance = new OpenAPI\Client\Api\DefaultApi(
61+
62+
$apiInstance = new OpenAPI\Client\Api\GlobalApi(
5563
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
5664
// This is optional, `GuzzleHttp\Client` will be used as default.
57-
new GuzzleHttp\Client()
65+
new GuzzleHttp\Client(),
66+
$config
5867
);
5968

6069
try {
6170
$result = $apiInstance->getV2Analytics();
6271
print_r($result);
6372
} catch (Exception $e) {
64-
echo 'Exception when calling DefaultApi->getV2Analytics: ', $e->getMessage(), PHP_EOL;
73+
echo 'Exception when calling GlobalApi->getV2Analytics: ', $e->getMessage(), PHP_EOL;
6574
}
6675

6776
```
@@ -72,27 +81,29 @@ All URIs are relative to *https://api.builtbybit.com*
7281

7382
Class | Method | HTTP request | Description
7483
------------ | ------------- | ------------- | -------------
75-
*DefaultApi* | [**getV2Analytics**](docs/Api/DefaultApi.md#getv2analytics) | **GET** /v2/analytics | Fetch a list of analytics definitions
76-
*DefaultApi* | [**getV2AnalyticsGraph**](docs/Api/DefaultApi.md#getv2analyticsgraph) | **GET** /v2/analytics/graph | Fetch analytics graph data
77-
*DefaultApi* | [**getV2Events**](docs/Api/DefaultApi.md#getv2events) | **GET** /v2/events | Fetch a list of pending events
78-
*DefaultApi* | [**postV2EventsComplete**](docs/Api/DefaultApi.md#postv2eventscomplete) | **POST** /v2/events/complete | Mark events as complete
79-
*DefaultApi* | [**postV2ResourcesCreatorUpdate**](docs/Api/DefaultApi.md#postv2resourcescreatorupdate) | **POST** /v2/resources/creator/update | Post a resource update
80-
*DiscoveryApi* | [**getResourcesDiscoverCategories**](docs/Api/DiscoveryApi.md#getresourcesdiscovercategories) | **GET** /v2/resources/discover/categories | Fetch a list of categories
81-
*DiscoveryApi* | [**getResourcesDiscoverResources**](docs/Api/DiscoveryApi.md#getresourcesdiscoverresources) | **GET** /v2/resources/discover/resources | Fetch a list of resources
82-
*DiscoveryApi* | [**getV2ResourcesDiscoverCartView**](docs/Api/DiscoveryApi.md#getv2resourcesdiscovercartview) | **GET** /v2/resources/discover/cart/view | View the user's cart items
83-
*DiscoveryApi* | [**getV2ResourcesDiscoverLicenses**](docs/Api/DiscoveryApi.md#getv2resourcesdiscoverlicenses) | **GET** /v2/resources/discover/licenses | Fetch a list of the user's licenses
84-
*DiscoveryApi* | [**postV2ResourcesDiscoverCartAdd**](docs/Api/DiscoveryApi.md#postv2resourcesdiscovercartadd) | **POST** /v2/resources/discover/cart/add | Add items to a user's cart
85-
*DiscoveryApi* | [**postV2ResourcesDiscoverCartCheckout**](docs/Api/DiscoveryApi.md#postv2resourcesdiscovercartcheckout) | **POST** /v2/resources/discover/cart/checkout | Initiate a checkout of a user's cart
86-
*DiscoveryApi* | [**postV2ResourcesDiscoverCartCouponAdd**](docs/Api/DiscoveryApi.md#postv2resourcesdiscovercartcouponadd) | **POST** /v2/resources/discover/cart/coupon/add | Add a coupon to the user's cart
87-
*DiscoveryApi* | [**postV2ResourcesDiscoverCartCouponRemove**](docs/Api/DiscoveryApi.md#postv2resourcesdiscovercartcouponremove) | **POST** /v2/resources/discover/cart/coupon/remove | Remove a coupon from the user's cart
88-
*DiscoveryApi* | [**postV2ResourcesDiscoverCartRemove**](docs/Api/DiscoveryApi.md#postv2resourcesdiscovercartremove) | **POST** /v2/resources/discover/cart/remove | Remove an item from the user's cart
84+
*GlobalApi* | [**getV2Analytics**](docs/Api/GlobalApi.md#getv2analytics) | **GET** /v2/analytics | Fetch a list of analytics definitions
85+
*GlobalApi* | [**getV2AnalyticsGraph**](docs/Api/GlobalApi.md#getv2analyticsgraph) | **GET** /v2/analytics/graph | Fetch analytics graph data
86+
*GlobalApi* | [**getV2AnalyticsSingle**](docs/Api/GlobalApi.md#getv2analyticssingle) | **GET** /v2/analytics/single | Fetch a single analytics value
87+
*GlobalApi* | [**getV2Events**](docs/Api/GlobalApi.md#getv2events) | **GET** /v2/events | Fetch a list of pending events
88+
*GlobalApi* | [**postV2EventsComplete**](docs/Api/GlobalApi.md#postv2eventscomplete) | **POST** /v2/events/complete | Mark events as complete
8989
*Oauth2Api* | [**getOauth2Token**](docs/Api/Oauth2Api.md#getoauth2token) | **POST** /oauth2/token | Request an access token using an existing grant
9090
*Oauth2Api* | [**getOauth2TokenRevoke**](docs/Api/Oauth2Api.md#getoauth2tokenrevoke) | **POST** /oauth2/token/revoke | Revoke an existing access or refresh token
91+
*ResourcesCreatorApi* | [**postV2ResourcesCreatorUpdate**](docs/Api/ResourcesCreatorApi.md#postv2resourcescreatorupdate) | **POST** /v2/resources/creator/update | Post a resource update
92+
*ResourcesDiscoveryApi* | [**getResourcesDiscoverCategories**](docs/Api/ResourcesDiscoveryApi.md#getresourcesdiscovercategories) | **GET** /v2/resources/discover/categories | Fetch a list of categories
93+
*ResourcesDiscoveryApi* | [**getResourcesDiscoverResources**](docs/Api/ResourcesDiscoveryApi.md#getresourcesdiscoverresources) | **GET** /v2/resources/discover/resources | Fetch a list of resources
94+
*ResourcesDiscoveryApi* | [**getV2ResourcesDiscoverCartView**](docs/Api/ResourcesDiscoveryApi.md#getv2resourcesdiscovercartview) | **GET** /v2/resources/discover/cart/view | View the user's cart items
95+
*ResourcesDiscoveryApi* | [**getV2ResourcesDiscoverLicenses**](docs/Api/ResourcesDiscoveryApi.md#getv2resourcesdiscoverlicenses) | **GET** /v2/resources/discover/licenses | Fetch a list of the user's licenses
96+
*ResourcesDiscoveryApi* | [**postV2ResourcesDiscoverCartAdd**](docs/Api/ResourcesDiscoveryApi.md#postv2resourcesdiscovercartadd) | **POST** /v2/resources/discover/cart/add | Add items to a user's cart
97+
*ResourcesDiscoveryApi* | [**postV2ResourcesDiscoverCartCheckout**](docs/Api/ResourcesDiscoveryApi.md#postv2resourcesdiscovercartcheckout) | **POST** /v2/resources/discover/cart/checkout | Initiate a checkout of a user's cart
98+
*ResourcesDiscoveryApi* | [**postV2ResourcesDiscoverCartCouponAdd**](docs/Api/ResourcesDiscoveryApi.md#postv2resourcesdiscovercartcouponadd) | **POST** /v2/resources/discover/cart/coupon/add | Add a coupon to the user's cart
99+
*ResourcesDiscoveryApi* | [**postV2ResourcesDiscoverCartCouponRemove**](docs/Api/ResourcesDiscoveryApi.md#postv2resourcesdiscovercartcouponremove) | **POST** /v2/resources/discover/cart/coupon/remove | Remove a coupon from the user's cart
100+
*ResourcesDiscoveryApi* | [**postV2ResourcesDiscoverCartRemove**](docs/Api/ResourcesDiscoveryApi.md#postv2resourcesdiscovercartremove) | **POST** /v2/resources/discover/cart/remove | Remove an item from the user's cart
91101

92102
## Models
93103

94104
- [Addon](docs/Model/Addon.md)
95105
- [Analytic](docs/Model/Analytic.md)
106+
- [AnalyticFiltersValue](docs/Model/AnalyticFiltersValue.md)
96107
- [AnalyticGraphData](docs/Model/AnalyticGraphData.md)
97108
- [AnalyticGraphDataPeriod](docs/Model/AnalyticGraphDataPeriod.md)
98109
- [AnalyticGraphDataPoint](docs/Model/AnalyticGraphDataPoint.md)
@@ -116,6 +127,9 @@ Class | Method | HTTP request | Description
116127
- [GetV2Analytics200Response](docs/Model/GetV2Analytics200Response.md)
117128
- [GetV2Analytics200ResponseData](docs/Model/GetV2Analytics200ResponseData.md)
118129
- [GetV2AnalyticsGraph200Response](docs/Model/GetV2AnalyticsGraph200Response.md)
130+
- [GetV2AnalyticsSingle200Response](docs/Model/GetV2AnalyticsSingle200Response.md)
131+
- [GetV2AnalyticsSingle200ResponseData](docs/Model/GetV2AnalyticsSingle200ResponseData.md)
132+
- [GetV2AnalyticsSingle200ResponseDataPeriod](docs/Model/GetV2AnalyticsSingle200ResponseDataPeriod.md)
119133
- [GetV2Events200Response](docs/Model/GetV2Events200Response.md)
120134
- [GetV2Events200ResponseData](docs/Model/GetV2Events200ResponseData.md)
121135
- [GetV2ResourcesDiscoverCartView200Response](docs/Model/GetV2ResourcesDiscoverCartView200Response.md)
@@ -159,6 +173,13 @@ Authentication schemes defined for the API:
159173
- **Location**: HTTP header
160174

161175

176+
### oauth2
177+
178+
- **Type**: `OAuth`
179+
- **Flow**: `accessCode`
180+
- **Authorization URL**: `https://builtbybit.com/account/external/authorize`
181+
- **Scopes**: N/A
182+
162183
## Tests
163184

164185
To run the tests, use:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"description": "All operations not tagged 'free' require an active [Ultimate](https://builtbybit.com/account/ultimate) subscription or invite-only permissions.",
2+
"description": "All operations not tagged 'free' require an active [Ultimate](https://builtbybit.com/account/ultimate) subscription or invite-only permissions. V2 documentation: https://builtbybit.com/wiki/api-v2/ \\ OAuth2 documentation: https://builtbybit.com/wiki/oauth2/",
33
"keywords": [
44
"openapitools",
55
"openapi-generator",

0 commit comments

Comments
 (0)