3165
3165
"type" : "string"
3166
3166
}
3167
3167
}
3168
+ };
3169
+ defs["price_service.BatchGetPricesRequest"] = {
3170
+ "title" : "GetPricesRequest is the request for GetPrices.\nreturn every price on every given timestamp (if exact exists) for the given coin",
3171
+ "type" : "object",
3172
+ "properties" : {
3173
+ "timestamps" : {
3174
+ "type" : "array",
3175
+ "items" : {
3176
+ "type" : "string",
3177
+ "format" : "date-time"
3178
+ }
3179
+ },
3180
+ "coinIds" : {
3181
+ "type" : "array",
3182
+ "items" : {
3183
+ "$ref" : "#/components/schemas/price_service.CoinID"
3184
+ }
3185
+ }
3186
+ }
3168
3187
};
3169
3188
defs["price_service.BatchGetPricesResponse"] = {
3170
3189
"type" : "object",
@@ -23135,7 +23154,7 @@ <h1>batchGetPrices</h1>
23135
23154
<p class="marked"></p>
23136
23155
<p></p>
23137
23156
<br />
23138
- <pre class="prettyprint language-html prettyprinted" data-type="get "><code><span class="pln">/api/v1/prices/batch</span></code></pre>
23157
+ <pre class="prettyprint language-html prettyprinted" data-type="post "><code><span class="pln">/api/v1/prices/batch</span></code></pre>
23139
23158
<p>
23140
23159
<h3>Usage and SDK Samples</h3>
23141
23160
</p>
@@ -23157,10 +23176,12 @@ <h3>Usage and SDK Samples</h3>
23157
23176
23158
23177
<div class="tab-content">
23159
23178
<div class="tab-pane active" id="examples-Price-batchGetPrices-0-curl">
23160
- <pre class="prettyprint"><code class="language-bsh">curl -X GET \
23179
+ <pre class="prettyprint"><code class="language-bsh">curl -X POST \
23161
23180
-H "api-key: [[apiKey]]" \
23162
23181
-H "Accept: application/json" \
23163
- "https://app.sentio.xyz/api/v1/prices/batch?timestamps="
23182
+ -H "Content-Type: application/json" \
23183
+ "https://app.sentio.xyz/api/v1/prices/batch" \
23184
+ -d ''
23164
23185
</code></pre>
23165
23186
</div>
23166
23187
<div class="tab-pane" id="examples-Price-batchGetPrices-0-java">
@@ -23184,10 +23205,10 @@ <h3>Usage and SDK Samples</h3>
23184
23205
23185
23206
// Create an instance of the API class
23186
23207
PriceApi apiInstance = new PriceApi();
23187
- array[Date] timestamps = ; // array[Date] |
23208
+ PriceServiceBatchGetPricesRequest body = ; // PriceServiceBatchGetPricesRequest |
23188
23209
23189
23210
try {
23190
- price_service.BatchGetPricesResponse result = apiInstance.batchGetPrices(timestamps );
23211
+ price_service.BatchGetPricesResponse result = apiInstance.batchGetPrices(body );
23191
23212
System.out.println(result);
23192
23213
} catch (ApiException e) {
23193
23214
System.err.println("Exception when calling PriceApi#batchGetPrices");
@@ -23203,10 +23224,10 @@ <h3>Usage and SDK Samples</h3>
23203
23224
23204
23225
final api_instance = DefaultApi();
23205
23226
23206
- final array[Date] timestamps = new array[Date] (); // array[Date] |
23227
+ final PriceServiceBatchGetPricesRequest body = new PriceServiceBatchGetPricesRequest (); // PriceServiceBatchGetPricesRequest |
23207
23228
23208
23229
try {
23209
- final result = await api_instance.batchGetPrices(timestamps );
23230
+ final result = await api_instance.batchGetPrices(body );
23210
23231
print(result);
23211
23232
} catch (e) {
23212
23233
print('Exception when calling DefaultApi->batchGetPrices: $e\n');
@@ -23221,10 +23242,10 @@ <h3>Usage and SDK Samples</h3>
23221
23242
public class PriceApiExample {
23222
23243
public static void main(String[] args) {
23223
23244
PriceApi apiInstance = new PriceApi();
23224
- array[Date] timestamps = ; // array[Date] |
23245
+ PriceServiceBatchGetPricesRequest body = ; // PriceServiceBatchGetPricesRequest |
23225
23246
23226
23247
try {
23227
- price_service.BatchGetPricesResponse result = apiInstance.batchGetPrices(timestamps );
23248
+ price_service.BatchGetPricesResponse result = apiInstance.batchGetPrices(body );
23228
23249
System.out.println(result);
23229
23250
} catch (ApiException e) {
23230
23251
System.err.println("Exception when calling PriceApi#batchGetPrices");
@@ -23248,10 +23269,10 @@ <h3>Usage and SDK Samples</h3>
23248
23269
23249
23270
// Create an instance of the API class
23250
23271
PriceApi *apiInstance = [[PriceApi alloc] init];
23251
- array[Date] *timestamps = ; // (optional) (default to null)
23272
+ PriceServiceBatchGetPricesRequest *body = ; //
23252
23273
23253
23274
// Batch get prices
23254
- [apiInstance batchGetPricesWith:timestamps
23275
+ [apiInstance batchGetPricesWith:body
23255
23276
completionHandler: ^(price_service.BatchGetPricesResponse output, NSError* error) {
23256
23277
if (output) {
23257
23278
NSLog(@"%@", output);
@@ -23275,9 +23296,7 @@ <h3>Usage and SDK Samples</h3>
23275
23296
23276
23297
// Create an instance of the API class
23277
23298
var api = new SentioApi.PriceApi()
23278
- var opts = {
23279
- 'timestamps': // {array[Date]}
23280
- };
23299
+ var body = ; // {PriceServiceBatchGetPricesRequest}
23281
23300
23282
23301
var callback = function(error, data, response) {
23283
23302
if (error) {
@@ -23286,7 +23305,7 @@ <h3>Usage and SDK Samples</h3>
23286
23305
console.log('API called successfully. Returned data: ' + data);
23287
23306
}
23288
23307
};
23289
- api.batchGetPrices(opts , callback);
23308
+ api.batchGetPrices(body , callback);
23290
23309
</code></pre>
23291
23310
</div>
23292
23311
@@ -23313,11 +23332,11 @@ <h3>Usage and SDK Samples</h3>
23313
23332
23314
23333
// Create an instance of the API class
23315
23334
var apiInstance = new PriceApi();
23316
- var timestamps = new array[Date] (); // array[Date] | (optional) (default to null)
23335
+ var body = new PriceServiceBatchGetPricesRequest (); // PriceServiceBatchGetPricesRequest |
23317
23336
23318
23337
try {
23319
23338
// Batch get prices
23320
- price_service.BatchGetPricesResponse result = apiInstance.batchGetPrices(timestamps );
23339
+ price_service.BatchGetPricesResponse result = apiInstance.batchGetPrices(body );
23321
23340
Debug.WriteLine(result);
23322
23341
} catch (Exception e) {
23323
23342
Debug.Print("Exception when calling PriceApi.batchGetPrices: " + e.Message );
@@ -23339,10 +23358,10 @@ <h3>Usage and SDK Samples</h3>
23339
23358
23340
23359
// Create an instance of the API class
23341
23360
$api_instance = new OpenAPITools\Client\Api\PriceApi();
23342
- $timestamps = ; // array[Date] |
23361
+ $body = ; // PriceServiceBatchGetPricesRequest |
23343
23362
23344
23363
try {
23345
- $result = $api_instance->batchGetPrices($timestamps );
23364
+ $result = $api_instance->batchGetPrices($body );
23346
23365
print_r($result);
23347
23366
} catch (Exception $e) {
23348
23367
echo 'Exception when calling PriceApi->batchGetPrices: ', $e->getMessage(), PHP_EOL;
@@ -23362,10 +23381,10 @@ <h3>Usage and SDK Samples</h3>
23362
23381
23363
23382
# Create an instance of the API class
23364
23383
my $api_instance = WWW::OPenAPIClient::PriceApi->new();
23365
- my $timestamps = [] ; # array[Date] |
23384
+ my $body = WWW::OPenAPIClient::Object::PriceServiceBatchGetPricesRequest->new() ; # PriceServiceBatchGetPricesRequest |
23366
23385
23367
23386
eval {
23368
- my $result = $api_instance->batchGetPrices(timestamps => $timestamps );
23387
+ my $result = $api_instance->batchGetPrices(body => $body );
23369
23388
print Dumper($result);
23370
23389
};
23371
23390
if ($@) {
@@ -23387,11 +23406,11 @@ <h3>Usage and SDK Samples</h3>
23387
23406
23388
23407
# Create an instance of the API class
23389
23408
api_instance = openapi_client.PriceApi()
23390
- timestamps = # array[Date] | (optional) (default to null)
23409
+ body = # PriceServiceBatchGetPricesRequest |
23391
23410
23392
23411
try:
23393
23412
# Batch get prices
23394
- api_response = api_instance.batch_get_prices(timestamps=timestamps )
23413
+ api_response = api_instance.batch_get_prices(body )
23395
23414
pprint(api_response)
23396
23415
except ApiException as e:
23397
23416
print("Exception when calling PriceApi->batchGetPrices: %s\n" % e)</code></pre>
@@ -23401,10 +23420,10 @@ <h3>Usage and SDK Samples</h3>
23401
23420
<pre class="prettyprint"><code class="language-rust">extern crate PriceApi;
23402
23421
23403
23422
pub fn main() {
23404
- let timestamps = ; // array[Date]
23423
+ let body = ; // PriceServiceBatchGetPricesRequest
23405
23424
23406
23425
let mut context = PriceApi::Context::default();
23407
- let result = client.batchGetPrices(timestamps , &context).wait();
23426
+ let result = client.batchGetPrices(body , &context).wait();
23408
23427
23409
23428
println!("{:?}", result);
23410
23429
}
@@ -23421,36 +23440,57 @@ <h2>Parameters</h2>
23421
23440
23422
23441
23423
23442
23424
-
23425
-
23426
- <div class="methodsubtabletitle">Query parameters</div>
23443
+ <div class="methodsubtabletitle">Body parameters</div>
23427
23444
<table id="methodsubtable">
23428
23445
<tr>
23429
23446
<th width="150px">Name</th>
23430
23447
<th>Description</th>
23431
23448
</tr>
23432
- <tr><td style="width:150px;">timestamps </td>
23449
+ <tr><td style="width:150px;">body <span style="color:red;">*</span> </td>
23433
23450
<td>
23451
+ <p class="marked"></p>
23452
+ <script>
23453
+ $(document).ready(function() {
23454
+ var schemaWrapper = {
23455
+ "content" : {
23456
+ "application/json" : {
23457
+ "schema" : {
23458
+ "$ref" : "#/components/schemas/price_service.BatchGetPricesRequest"
23459
+ }
23460
+ }
23461
+ },
23462
+ "required" : true
23463
+ };
23434
23464
23465
+ var schema = findNode('schema',schemaWrapper).schema;
23466
+ if (!schema) {
23467
+ schema = schemaWrapper.schema;
23468
+ }
23469
+ if (schema.$ref != null) {
23470
+ schema = defsParser.$refs.get(schema.$ref);
23471
+ } else if (schema.items != null && schema.items.$ref != null) {
23472
+ schema.items = defsParser.$refs.get(schema.items.$ref);
23473
+ } else {
23474
+ schemaWrapper.definitions = Object.assign({}, defs);
23475
+ $RefParser.dereference(schemaWrapper).catch(function(err) {
23476
+ console.log(err);
23477
+ });
23478
+ }
23435
23479
23436
- <div id="d2e199_batchGetPrices_timestamps">
23437
- <div class="json-schema-view">
23438
- <div class="primitive">
23439
- <span class="type">
23440
- array[Date]
23441
- </span>
23442
- <span class="format">
23443
- (date-time)
23444
- </span>
23445
-
23446
- </div>
23447
- </div>
23448
- </div>
23480
+ var view = new JSONSchemaView(schema,2,{isBodyParam: true});
23481
+ var result = $('#d2e199_batchGetPrices_body');
23482
+ result.empty();
23483
+ result.append(view.render());
23484
+ });
23485
+ </script>
23486
+ <div id="d2e199_batchGetPrices_body"></div>
23449
23487
</td>
23450
23488
</tr>
23451
23489
23452
23490
</table>
23453
23491
23492
+
23493
+
23454
23494
<h2>Responses</h2>
23455
23495
<h3 id="examples-Price-batchGetPrices-title-200"></h3>
23456
23496
<p id="examples-Price-batchGetPrices-description-200" class="marked"></p>
0 commit comments