|
| 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 | + |
0 commit comments