Skip to content

Latest commit

 

History

History
182 lines (122 loc) · 5.51 KB

QuotesApi.md

File metadata and controls

182 lines (122 loc) · 5.51 KB

Bzzhh\Tzkt\QuotesApi

All URIs are relative to https://api.tzkt.io, except if the operation defines another base path.

Method HTTP request Description
quotesGet() GET /v1/quotes Get quotes
quotesGetCount() GET /v1/quotes/count Get quotes count
quotesGetLast() GET /v1/quotes/last Get last quote

quotesGet()

quotesGet($level, $timestamp, $select, $sort, $offset, $limit): \Bzzhh\Tzkt\Model\Quote[]

Get quotes

Returns a list of quotes aligned with blocks.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Bzzhh\Tzkt\Api\QuotesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$level = new \Bzzhh\Tzkt\Model\AccountsGetIdParameter(); // AccountsGetIdParameter | Filters quotes by level.
$timestamp = new \Bzzhh\Tzkt\Model\AccountsGetOperationsTimestampParameter(); // AccountsGetOperationsTimestampParameter | Filters quotes by timestamp.
$select = new \Bzzhh\Tzkt\Model\AccountsGetSelectParameter(); // AccountsGetSelectParameter | Specify comma-separated list of fields to include into response or leave it undefined to return full object. If you select single field, response will be an array of values in both `.fields` and `.values` modes.
$sort = new \Bzzhh\Tzkt\Model\AccountsGetSortParameter(); // AccountsGetSortParameter | Sorts quotes by specified field. Supported fields: `level` (default).
$offset = new \Bzzhh\Tzkt\Model\AccountsGetOffsetParameter(); // AccountsGetOffsetParameter | Specifies which or how many items should be skipped
$limit = 100; // int | Maximum number of items to return

try {
    $result = $apiInstance->quotesGet($level, $timestamp, $select, $sort, $offset, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuotesApi->quotesGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
level AccountsGetIdParameter Filters quotes by level. [optional]
timestamp AccountsGetOperationsTimestampParameter Filters quotes by timestamp. [optional]
select AccountsGetSelectParameter Specify comma-separated list of fields to include into response or leave it undefined to return full object. If you select single field, response will be an array of values in both `.fields` and `.values` modes. [optional]
sort AccountsGetSortParameter Sorts quotes by specified field. Supported fields: `level` (default). [optional]
offset AccountsGetOffsetParameter Specifies which or how many items should be skipped [optional]
limit int Maximum number of items to return [optional] [default to 100]

Return type

\Bzzhh\Tzkt\Model\Quote[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

quotesGetCount()

quotesGetCount(): int

Get quotes count

Returns the total number of quotes aligned with blocks.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Bzzhh\Tzkt\Api\QuotesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->quotesGetCount();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuotesApi->quotesGetCount: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

int

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

quotesGetLast()

quotesGetLast(): \Bzzhh\Tzkt\Model\Quote

Get last quote

Returns last known quote.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Bzzhh\Tzkt\Api\QuotesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->quotesGetLast();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QuotesApi->quotesGetLast: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\Bzzhh\Tzkt\Model\Quote

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]