Skip to content

Latest commit

 

History

History
192 lines (132 loc) · 6.83 KB

CommitmentsApi.md

File metadata and controls

192 lines (132 loc) · 6.83 KB

Bzzhh\Tzkt\CommitmentsApi

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

Method HTTP request Description
commitmentsGet() GET /v1/commitments/{address} Get commitment by blinded address
commitmentsGetAll() GET /v1/commitments Get commitments
commitmentsGetCount() GET /v1/commitments/count Get commitments count

commitmentsGet()

commitmentsGet($address): \Bzzhh\Tzkt\Model\Commitment

Get commitment by blinded address

Returns a commitment with the specified blinded address.

Example

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



$apiInstance = new Bzzhh\Tzkt\Api\CommitmentsApi(
    // 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()
);
$address = 'address_example'; // string | Blinded address (starting with btz)

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

Parameters

Name Type Description Notes
address string Blinded address (starting with btz)

Return type

\Bzzhh\Tzkt\Model\Commitment

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]

commitmentsGetAll()

commitmentsGetAll($activated, $activation_level, $balance, $select, $sort, $offset, $limit): \Bzzhh\Tzkt\Model\Commitment[]

Get commitments

Returns a list of commitments.

Example

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



$apiInstance = new Bzzhh\Tzkt\Api\CommitmentsApi(
    // 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()
);
$activated = True; // bool | Filters commitments by activation status
$activation_level = new \Bzzhh\Tzkt\Model\CommitmentsGetAllActivationLevelParameter(); // CommitmentsGetAllActivationLevelParameter | Filters commitments by activation level
$balance = new \Bzzhh\Tzkt\Model\AccountsGetBalanceParameter(); // AccountsGetBalanceParameter | Filters commitments by activated balance
$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 delegators by specified field. Supported fields: `id` (default), `balance`, `activationLevel`.
$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->commitmentsGetAll($activated, $activation_level, $balance, $select, $sort, $offset, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommitmentsApi->commitmentsGetAll: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
activated bool Filters commitments by activation status [optional]
activation_level CommitmentsGetAllActivationLevelParameter Filters commitments by activation level [optional]
balance AccountsGetBalanceParameter Filters commitments by activated balance [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 delegators by specified field. Supported fields: `id` (default), `balance`, `activationLevel`. [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\Commitment[]

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]

commitmentsGetCount()

commitmentsGetCount($activated, $balance): int

Get commitments count

Returns a number of commitments.

Example

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



$apiInstance = new Bzzhh\Tzkt\Api\CommitmentsApi(
    // 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()
);
$activated = True; // bool | Filters commitments by activation status
$balance = new \Bzzhh\Tzkt\Model\AccountsGetBalanceParameter(); // AccountsGetBalanceParameter | Filters commitments by activated balance

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

Parameters

Name Type Description Notes
activated bool Filters commitments by activation status [optional]
balance AccountsGetBalanceParameter Filters commitments by activated balance [optional]

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]