Skip to content

Commit

Permalink
generate client
Browse files Browse the repository at this point in the history
  • Loading branch information
ziwot committed Jul 8, 2024
1 parent 355f460 commit 621bd95
Show file tree
Hide file tree
Showing 555 changed files with 77,312 additions and 10,985 deletions.
175 changes: 147 additions & 28 deletions .openapi-generator/FILES

Large diffs are not rendered by default.

222 changes: 178 additions & 44 deletions README.md

Large diffs are not rendered by default.

80 changes: 40 additions & 40 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
{
"name": "bzzhh/tzkt-php-client",
"description": "# Introduction TzKT Explorer provides free REST API and WebSocket API for accessing detailed Tezos blockchain data and helps developers build more services and applications on top of Tezos. TzKT is an open-source project, so you can easily clone and build it and use it as a self-hosted service to avoid any risks of depending on third-party services. TzKT API is available for the following Tezos networks with the following base URLs: - Mainnet: `https://api.tzkt.io/` or `https://api.mainnet.tzkt.io/` ([view docs](https://api.tzkt.io)) - Ghostnet: `https://api.ghostnet.tzkt.io/` ([view docs](https://api.ghostnet.tzkt.io)) - Mumbainet: `https://api.mumbainet.tzkt.io/` ([view docs](https://api.mumbainet.tzkt.io)) - Nairobinet: `https://api.nairobinet.tzkt.io/` ([view docs](https://api.nairobinet.tzkt.io)) We also provide a staging environment for testing newest features and pre-updating client applications before deploying to production: - Mainnet staging: `https://staging.api.tzkt.io/` or `https://staging.api.mainnet.tzkt.io/` ([view docs](https://staging.api.tzkt.io)) Feel free to contact us if you have any questions or feature requests. Your feedback really helps us make TzKT better! - Discord: https://discord.gg/aG8XKuwsQd - Telegram: https://t.me/baking_bad_chat - Slack: https://tezos-dev.slack.com/archives/CV5NX7F2L - Twitter: https://twitter.com/TezosBakingBad - Email: [email protected] And don't forget to star TzKT project [on GitHub](https://github.com/baking-bad/tzkt) ;) # Terms of Use TzKT API is free for everyone and for both commercial and non-commercial usage. If your application or service uses the TzKT API in any forms: directly on frontend or indirectly on backend, you must mention that fact on your website or application by placing the label **\"Powered by TzKT API\"** or **\"Built with TzKT API\"** with a direct link to [tzkt.io](https://tzkt.io). # Rate Limits There will be no rate limits as long as our servers can handle the load without additional infrastructure costs. However, any apparent abuse will be prevented by setting targeted rate limits. Check out [Tezos Explorer API Best Practices](https://baking-bad.org/blog/tag/TzKT/) and in particular [how to optimize requests count](https://baking-bad.org/blog/2020/07/29/tezos-explorer-api-tzkt-how-often-to-make-requests/). ---",
"keywords": [
"openapitools",
"openapi-generator",
"openapi",
"php",
"sdk",
"rest",
"api"
],
"homepage": "https://openapi-generator.tech",
"license": "MIT",
"authors": [
{
"name": "OpenAPI-Generator contributors",
"homepage": "https://openapi-generator.tech"
"name": "bzzhh/tzkt-php-client",
"description": "Auto-generated Tzkt OpenApi Client",
"keywords": [
"openapitools",
"openapi-generator",
"openapi",
"php",
"sdk",
"rest",
"api"
],
"homepage": "https://openapi-generator.tech",
"license": "MIT",
"authors": [
{
"name": "OpenAPI-Generator contributors",
"homepage": "https://openapi-generator.tech"
}
],
"require": {
"php": "^7.4 || ^8.0",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^7.3",
"guzzlehttp/psr7": "^1.7 || ^2.0"
},
"require-dev": {
"phpunit/phpunit": "^8.0 || ^9.0",
"friendsofphp/php-cs-fixer": "^3.5"
},
"autoload": {
"psr-4": {
"Bzzhh\\Tzkt\\": "lib/"
}
},
"autoload-dev": {
"psr-4": {
"Bzzhh\\Tzkt\\Test\\": "test/"
}
}
],
"require": {
"php": "^7.4 || ^8.0",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^7.3",
"guzzlehttp/psr7": "^1.7 || ^2.0"
},
"require-dev": {
"phpunit/phpunit": "^8.0 || ^9.0",
"friendsofphp/php-cs-fixer": "^3.5"
},
"autoload": {
"psr-4": {
"Bzzhh\\Tzkt\\": "lib/"
}
},
"autoload-dev": {
"psr-4": {
"Bzzhh\\Tzkt\\Test\\": "test/"
}
}
}
12 changes: 7 additions & 5 deletions docs/Api/AccountsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ All URIs are relative to https://api.tzkt.io, except if the operation defines an
## `accountsGet()`

```php
accountsGet($id, $address, $type, $kind, $delegate, $balance, $staked, $last_activity, $select, $sort, $offset, $limit): \Bzzhh\Tzkt\Model\Account[]
accountsGet($id, $address, $type, $kind, $delegate, $staked_pseudotokens, $balance, $staked, $last_activity, $select, $sort, $offset, $limit): \Bzzhh\Tzkt\Model\Account[]
```

Get accounts
Expand All @@ -46,6 +46,7 @@ $address = new \Bzzhh\Tzkt\Model\AccountsGetAddressParameter(); // AccountsGetAd
$type = new \Bzzhh\Tzkt\Model\AccountsGetTypeParameter(); // AccountsGetTypeParameter | Filters accounts by type (`user`, `delegate`, `contract`, `rollup`, `smart_rollup`, `ghost`).
$kind = new \Bzzhh\Tzkt\Model\AccountsGetKindParameter(); // AccountsGetKindParameter | Filters accounts by contract kind (`delegator_contract` or `smart_contract`)
$delegate = new \Bzzhh\Tzkt\Model\AccountsGetDelegateParameter(); // AccountsGetDelegateParameter | Filters accounts by delegate. Allowed fields for `.eqx` mode: none.
$staked_pseudotokens = new \Bzzhh\Tzkt\Model\AccountsGetStakedPseudotokensParameter(); // AccountsGetStakedPseudotokensParameter | Filters accounts by amount of staked pseudotokens.
$balance = new \Bzzhh\Tzkt\Model\AccountsGetBalanceParameter(); // AccountsGetBalanceParameter | Filters accounts by balance
$staked = new \Bzzhh\Tzkt\Model\AccountsGetStakedParameter(); // AccountsGetStakedParameter | Filters accounts by participation in staking
$last_activity = new \Bzzhh\Tzkt\Model\AccountsGetIdParameter(); // AccountsGetIdParameter | Filters accounts by last activity level (where the account was updated)
Expand All @@ -55,7 +56,7 @@ $offset = new \Bzzhh\Tzkt\Model\AccountsGetOffsetParameter(); // AccountsGetOffs
$limit = 100; // int | Maximum number of items to return

try {
$result = $apiInstance->accountsGet($id, $address, $type, $kind, $delegate, $balance, $staked, $last_activity, $select, $sort, $offset, $limit);
$result = $apiInstance->accountsGet($id, $address, $type, $kind, $delegate, $staked_pseudotokens, $balance, $staked, $last_activity, $select, $sort, $offset, $limit);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountsApi->accountsGet: ', $e->getMessage(), PHP_EOL;
Expand All @@ -71,6 +72,7 @@ try {
| **type** | [**AccountsGetTypeParameter**](../Model/.md)| Filters accounts by type (`user`, `delegate`, `contract`, `rollup`, `smart_rollup`, `ghost`). | [optional] |
| **kind** | [**AccountsGetKindParameter**](../Model/.md)| Filters accounts by contract kind (`delegator_contract` or `smart_contract`) | [optional] |
| **delegate** | [**AccountsGetDelegateParameter**](../Model/.md)| Filters accounts by delegate. Allowed fields for `.eqx` mode: none. | [optional] |
| **staked_pseudotokens** | [**AccountsGetStakedPseudotokensParameter**](../Model/.md)| Filters accounts by amount of staked pseudotokens. | [optional] |
| **balance** | [**AccountsGetBalanceParameter**](../Model/.md)| Filters accounts by balance | [optional] |
| **staked** | [**AccountsGetStakedParameter**](../Model/.md)| Filters accounts by participation in staking | [optional] |
| **last_activity** | [**AccountsGetIdParameter**](../Model/.md)| Filters accounts by last activity level (where the account was updated) | [optional] |
Expand Down Expand Up @@ -160,7 +162,7 @@ accountsGetBalanceAtDate($address, $datetime): int

Get balance at date

Returns account balance at the specified datetime
Returns account balance* at the specified datetime. \\* - for non-baker tz-accounts historical balances do not include staked tez, because stakers do not really have staked tez on their balance, they have staking pseudotokens instead. If you want to get a full historical balance, including staked tez, use the Tezos node RPC: `/chains/main/blocks/{level}/context/contracts/{address}/full_balance`.

### Example

Expand Down Expand Up @@ -218,7 +220,7 @@ accountsGetBalanceAtLevel($address, $level): int

Get balance at level

Returns account balance at the specified block
Returns account balance* at the specified block. \\* - for non-baker tz-accounts historical balances do not include staked tez, because stakers do not really have staked tez on their balance, they have staking pseudotokens instead. If you want to get a full historical balance, including staked tez, use the Tezos node RPC: `/chains/main/blocks/{level}/context/contracts/{address}/full_balance`.

### Example

Expand Down Expand Up @@ -276,7 +278,7 @@ accountsGetBalanceHistory($address, $step, $select, $sort, $offset, $limit, $quo

Get balance history

Returns time series with historical balances (only changes, without duplicates).
Returns time series with historical balances* (only changes, without duplicates). \\* - for non-baker tz-accounts historical balances do not include staked tez, because stakers do not really have staked tez on their balance, they have staking pseudotokens instead. If you want to get a full historical balance, including staked tez, use the Tezos node RPC: `/chains/main/blocks/{level}/context/contracts/{address}/full_balance`.

### Example

Expand Down
Loading

0 comments on commit 621bd95

Please sign in to comment.