Skip to content

Commit

Permalink
fix: automatic api update (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Aug 12, 2024
1 parent 73f2955 commit db1f794
Show file tree
Hide file tree
Showing 42 changed files with 3,879 additions and 32 deletions.
117 changes: 117 additions & 0 deletions docs/evm_api/nft.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@
- [get_nft_trades](#get_nft_trades)
- [get_nft_trades_by_token](#get_nft_trades_by_token)
- [get_nft_trades_by_wallet](#get_nft_trades_by_wallet)
- [get_nft_traits_by_collection](#get_nft_traits_by_collection)
- [get_nft_traits_by_collection_paginate](#get_nft_traits_by_collection_paginate)
- [get_nft_transfers](#get_nft_transfers)
- [get_nft_transfers_by_block](#get_nft_transfers_by_block)
- [get_nft_transfers_from_to_block](#get_nft_transfers_from_to_block)
- [get_wallet_nft_collections](#get_wallet_nft_collections)
- [get_wallet_nft_transfers](#get_wallet_nft_transfers)
- [get_wallet_nfts](#get_wallet_nfts)
- [re_sync_metadata](#re_sync_metadata)
- [resync_nft_rarity](#resync_nft_rarity)
- [sync_nft_contract](#sync_nft_contract)


Expand Down Expand Up @@ -757,6 +760,84 @@ print(result)



---
## get_nft_traits_by_collection

> `evm_api.nft.get_nft_traits_by_collection()`
Get traits of NFTs for a given contract.


### Example
```python
from moralis import evm_api

api_key = "YOUR_API_KEY"
params = {
"address": "0x524cab2ec69124574082676e6f654a18df49a048",
"chain": "eth",
}

result = evm_api.nft.get_nft_traits_by_collection(
api_key=api_key,
params=params,
)

print(result)

```

### Parameters

| Name | Type | Description | Required | Default | Example |
|------|------|-------------|----------|---------|---------|
| address | str | The address of the NFT contract | Yes | | "0x524cab2ec69124574082676e6f654a18df49a048" |
| chain | enum[str]: <br/>- "eth"<br/>- "0x1"<br/>- "sepolia"<br/>- "0xaa36a7"<br/>- "polygon"<br/>- "0x89"<br/>- "bsc"<br/>- "0x38"<br/>- "bsc testnet"<br/>- "0x61"<br/>- "avalanche"<br/>- "0xa86a"<br/>- "fantom"<br/>- "0xfa"<br/>- "palm"<br/>- "0x2a15c308d"<br/>- "cronos"<br/>- "0x19"<br/>- "arbitrum"<br/>- "0xa4b1"<br/>- "chiliz"<br/>- "0x15b38"<br/>- "chiliz testnet"<br/>- "0x15b32"<br/>- "gnosis"<br/>- "0x64"<br/>- "gnosis testnet"<br/>- "0x27d8"<br/>- "base"<br/>- "0x2105"<br/>- "base sepolia"<br/>- "0x14a34"<br/>- "optimism"<br/>- "0xa"<br/>- "holesky"<br/>- "0x4268"<br/>- "polygon amoy"<br/>- "0x13882"<br/>- "linea"<br/>- "0xe708"<br/>- "moonbeam"<br/>- "0x504"<br/>- "moonriver"<br/>- "0x505"<br/>- "moonbase"<br/>- "0x507"<br/>- "linea sepolia"<br/>- "0xe705" | The chain to query | | "eth" | "eth" |



---
## get_nft_traits_by_collection_paginate

> `evm_api.nft.get_nft_traits_by_collection_paginate()`
Get traits of NFTs for a given contract with pagination.


### Example
```python
from moralis import evm_api

api_key = "YOUR_API_KEY"
params = {
"address": "0x524cab2ec69124574082676e6f654a18df49a048",
"chain": "eth",
"cursor": "",
"limit": 0,
"order": "DESC",
}

result = evm_api.nft.get_nft_traits_by_collection_paginate(
api_key=api_key,
params=params,
)

print(result)

```

### Parameters

| Name | Type | Description | Required | Default | Example |
|------|------|-------------|----------|---------|---------|
| address | str | The address of the NFT contract | Yes | | "0x524cab2ec69124574082676e6f654a18df49a048" |
| chain | enum[str]: <br/>- "eth"<br/>- "0x1"<br/>- "sepolia"<br/>- "0xaa36a7"<br/>- "polygon"<br/>- "0x89"<br/>- "bsc"<br/>- "0x38"<br/>- "bsc testnet"<br/>- "0x61"<br/>- "avalanche"<br/>- "0xa86a"<br/>- "fantom"<br/>- "0xfa"<br/>- "palm"<br/>- "0x2a15c308d"<br/>- "cronos"<br/>- "0x19"<br/>- "arbitrum"<br/>- "0xa4b1"<br/>- "chiliz"<br/>- "0x15b38"<br/>- "chiliz testnet"<br/>- "0x15b32"<br/>- "gnosis"<br/>- "0x64"<br/>- "gnosis testnet"<br/>- "0x27d8"<br/>- "base"<br/>- "0x2105"<br/>- "base sepolia"<br/>- "0x14a34"<br/>- "optimism"<br/>- "0xa"<br/>- "holesky"<br/>- "0x4268"<br/>- "polygon amoy"<br/>- "0x13882"<br/>- "linea"<br/>- "0xe708"<br/>- "moonbeam"<br/>- "0x504"<br/>- "moonriver"<br/>- "0x505"<br/>- "moonbase"<br/>- "0x507"<br/>- "linea sepolia"<br/>- "0xe705" | The chain to query | | "eth" | "eth" |
| cursor | str | The cursor returned in the previous response (used for getting the next page). | | | "" |
| limit | int | The desired page size of the result. | | | 0 |
| order | enum[str]: <br/>- "ASC"<br/>- "DESC" | The order of the result, in ascending (ASC) or descending (DESC) | | "DESC" | "DESC" |



---
## get_nft_transfers

Expand Down Expand Up @@ -1094,6 +1175,42 @@ print(result)



---
## resync_nft_rarity

> `evm_api.nft.resync_nft_rarity()`
Resync the NFT Trait for a given contract.


### Example
```python
from moralis import evm_api

api_key = "YOUR_API_KEY"
params = {
"address": "0x524cab2ec69124574082676e6f654a18df49a048",
"chain": "eth",
}

result = evm_api.nft.resync_nft_rarity(
api_key=api_key,
params=params,
)

print(result)

```

### Parameters

| Name | Type | Description | Required | Default | Example |
|------|------|-------------|----------|---------|---------|
| address | str | The address of the NFT contract | Yes | | "0x524cab2ec69124574082676e6f654a18df49a048" |
| chain | enum[str]: <br/>- "eth"<br/>- "0x1"<br/>- "sepolia"<br/>- "0xaa36a7"<br/>- "polygon"<br/>- "0x89"<br/>- "bsc"<br/>- "0x38"<br/>- "bsc testnet"<br/>- "0x61"<br/>- "avalanche"<br/>- "0xa86a"<br/>- "fantom"<br/>- "0xfa"<br/>- "palm"<br/>- "0x2a15c308d"<br/>- "cronos"<br/>- "0x19"<br/>- "arbitrum"<br/>- "0xa4b1"<br/>- "chiliz"<br/>- "0x15b38"<br/>- "chiliz testnet"<br/>- "0x15b32"<br/>- "gnosis"<br/>- "0x64"<br/>- "gnosis testnet"<br/>- "0x27d8"<br/>- "base"<br/>- "0x2105"<br/>- "base sepolia"<br/>- "0x14a34"<br/>- "optimism"<br/>- "0xa"<br/>- "holesky"<br/>- "0x4268"<br/>- "polygon amoy"<br/>- "0x13882"<br/>- "linea"<br/>- "0xe708"<br/>- "moonbeam"<br/>- "0x504"<br/>- "moonriver"<br/>- "0x505"<br/>- "moonbase"<br/>- "0x507"<br/>- "linea sepolia"<br/>- "0xe705" | The chain to query | | "eth" | "eth" |



---
## sync_nft_contract

Expand Down
2 changes: 0 additions & 2 deletions docs/evm_api/wallets.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ params = {
"from_date": "",
"to_date": "",
"include_internal_transactions": True,
"include_input_data": True,
"nft_metadata": True,
"cursor": "",
"order": "DESC",
Expand All @@ -208,7 +207,6 @@ print(result)
| from_date | str | The start date from which to get the transactions (format in seconds or datestring accepted by momentjs)<br/>* Provide the param 'from_block' or 'from_date'<br/>* If 'from_date' and 'from_block' are provided, 'from_block' will be used.<br/> | | | "" |
| to_date | str | Get the transactions up to this date (format in seconds or datestring accepted by momentjs)<br/>* Provide the param 'to_block' or 'to_date'<br/>* If 'to_date' and 'to_block' are provided, 'to_block' will be used.<br/> | | | "" |
| include_internal_transactions | bool | If the result should contain the internal transactions. | | | True |
| include_input_data | bool | Set the input data from the result | | False | True |
| nft_metadata | bool | If the result should contain the nft metadata. | | | True |
| cursor | str | The cursor returned in the previous response (used for getting the next page). | | | "" |
| order | enum[str]: <br/>- "ASC"<br/>- "DESC" | The order of the result, in ascending (ASC) or descending (DESC) | | "DESC" | "DESC" |
Expand Down
28 changes: 28 additions & 0 deletions src/moralis/evm_api/nft/get_nft_traits_by_collection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import json
import typing
import typing_extensions
from .api_instance import get_api_instance
from openapi_evm_api.paths.nft_address_traits.get import RequestQueryParams, RequestPathParams



class QueryParams(RequestQueryParams):
pass

class Params(QueryParams,RequestPathParams,):
pass

def get_nft_traits_by_collection(api_key: str, params: Params):
api_instance = get_api_instance(api_key, params)
query_params: typing.Any = {k: v for k, v in params.items() if k in RequestQueryParams.__annotations__.keys()}
path_params: typing.Any = {k: v for k, v in params.items() if k in RequestPathParams.__annotations__.keys()}
api_response = api_instance.get_nft_traits_by_collection(
query_params=query_params,
path_params=path_params,
accept_content_types=(
'application/json; charset=utf-8',
),
skip_deserialization=True
)

return json.loads(api_response.response.data)
28 changes: 28 additions & 0 deletions src/moralis/evm_api/nft/get_nft_traits_by_collection_paginate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import json
import typing
import typing_extensions
from .api_instance import get_api_instance
from openapi_evm_api.paths.nft_address_traits_paginate.get import RequestQueryParams, RequestPathParams



class QueryParams(RequestQueryParams):
pass

class Params(QueryParams,RequestPathParams,):
pass

def get_nft_traits_by_collection_paginate(api_key: str, params: Params):
api_instance = get_api_instance(api_key, params)
query_params: typing.Any = {k: v for k, v in params.items() if k in RequestQueryParams.__annotations__.keys()}
path_params: typing.Any = {k: v for k, v in params.items() if k in RequestPathParams.__annotations__.keys()}
api_response = api_instance.get_nft_traits_by_collection_paginate(
query_params=query_params,
path_params=path_params,
accept_content_types=(
'application/json; charset=utf-8',
),
skip_deserialization=True
)

return json.loads(api_response.response.data)
3 changes: 3 additions & 0 deletions src/moralis/evm_api/nft/nft.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
from .get_nft_trades import get_nft_trades
from .get_nft_trades_by_token import get_nft_trades_by_token
from .get_nft_trades_by_wallet import get_nft_trades_by_wallet
from .get_nft_traits_by_collection import get_nft_traits_by_collection
from .get_nft_traits_by_collection_paginate import get_nft_traits_by_collection_paginate
from .get_nft_transfers import get_nft_transfers
from .get_nft_transfers_by_block import get_nft_transfers_by_block
from .get_nft_transfers_from_to_block import get_nft_transfers_from_to_block
from .get_wallet_nft_collections import get_wallet_nft_collections
from .get_wallet_nft_transfers import get_wallet_nft_transfers
from .get_wallet_nfts import get_wallet_nfts
from .re_sync_metadata import re_sync_metadata
from .resync_nft_rarity import resync_nft_rarity
from .sync_nft_contract import sync_nft_contract
28 changes: 28 additions & 0 deletions src/moralis/evm_api/nft/resync_nft_rarity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import json
import typing
import typing_extensions
from .api_instance import get_api_instance
from openapi_evm_api.paths.nft_address_traits_resync.get import RequestQueryParams, RequestPathParams



class QueryParams(RequestQueryParams):
pass

class Params(QueryParams,RequestPathParams,):
pass

def resync_nft_rarity(api_key: str, params: Params):
api_instance = get_api_instance(api_key, params)
query_params: typing.Any = {k: v for k, v in params.items() if k in RequestQueryParams.__annotations__.keys()}
path_params: typing.Any = {k: v for k, v in params.items() if k in RequestPathParams.__annotations__.keys()}
api_response = api_instance.resync_nft_rarity(
query_params=query_params,
path_params=path_params,
accept_content_types=(
'application/json; charset=utf-8',
),
skip_deserialization=True
)

return json.loads(api_response.response.data)
9 changes: 9 additions & 0 deletions src/openapi_evm_api/apis/path_to_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
from openapi_evm_api.apis.paths.nft_address_transfers import NftAddressTransfers
from openapi_evm_api.apis.paths.nft_transfers import NftTransfers
from openapi_evm_api.apis.paths.block_block_number_or_hash_nft_transfers import BlockBlockNumberOrHashNftTransfers
from openapi_evm_api.apis.paths.nft_address_traits import NftAddressTraits
from openapi_evm_api.apis.paths.nft_address_traits_paginate import NftAddressTraitsPaginate
from openapi_evm_api.apis.paths.nft_address_traits_resync import NftAddressTraitsResync
from openapi_evm_api.apis.paths.nft_address_trades import NftAddressTrades
from openapi_evm_api.apis.paths.nft_address_token_id_trades import NftAddressTokenIdTrades
from openapi_evm_api.apis.paths.wallets_address_nfts_trades import WalletsAddressNftsTrades
Expand Down Expand Up @@ -99,6 +102,9 @@
PathValues.NFT_ADDRESS_TRANSFERS: NftAddressTransfers,
PathValues.NFT_TRANSFERS: NftTransfers,
PathValues.BLOCK_BLOCK_NUMBER_OR_HASH_NFT_TRANSFERS: BlockBlockNumberOrHashNftTransfers,
PathValues.NFT_ADDRESS_TRAITS: NftAddressTraits,
PathValues.NFT_ADDRESS_TRAITS_PAGINATE: NftAddressTraitsPaginate,
PathValues.NFT_ADDRESS_TRAITS_RESYNC: NftAddressTraitsResync,
PathValues.NFT_ADDRESS_TRADES: NftAddressTrades,
PathValues.NFT_ADDRESS_TOKEN_ID_TRADES: NftAddressTokenIdTrades,
PathValues.WALLETS_ADDRESS_NFTS_TRADES: WalletsAddressNftsTrades,
Expand Down Expand Up @@ -189,6 +195,9 @@
PathValues.NFT_ADDRESS_TRANSFERS: NftAddressTransfers,
PathValues.NFT_TRANSFERS: NftTransfers,
PathValues.BLOCK_BLOCK_NUMBER_OR_HASH_NFT_TRANSFERS: BlockBlockNumberOrHashNftTransfers,
PathValues.NFT_ADDRESS_TRAITS: NftAddressTraits,
PathValues.NFT_ADDRESS_TRAITS_PAGINATE: NftAddressTraitsPaginate,
PathValues.NFT_ADDRESS_TRAITS_RESYNC: NftAddressTraitsResync,
PathValues.NFT_ADDRESS_TRADES: NftAddressTrades,
PathValues.NFT_ADDRESS_TOKEN_ID_TRADES: NftAddressTokenIdTrades,
PathValues.WALLETS_ADDRESS_NFTS_TRADES: WalletsAddressNftsTrades,
Expand Down
7 changes: 7 additions & 0 deletions src/openapi_evm_api/apis/paths/nft_address_traits.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from openapi_evm_api.paths.nft_address_traits.get import ApiForget


class NftAddressTraits(
ApiForget,
):
pass
7 changes: 7 additions & 0 deletions src/openapi_evm_api/apis/paths/nft_address_traits_paginate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from openapi_evm_api.paths.nft_address_traits_paginate.get import ApiForget


class NftAddressTraitsPaginate(
ApiForget,
):
pass
7 changes: 7 additions & 0 deletions src/openapi_evm_api/apis/paths/nft_address_traits_resync.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from openapi_evm_api.paths.nft_address_traits_resync.get import ApiForget


class NftAddressTraitsResync(
ApiForget,
):
pass
6 changes: 6 additions & 0 deletions src/openapi_evm_api/apis/tags/nft_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@
from openapi_evm_api.paths.nft_address_trades.get import GetNftTrades
from openapi_evm_api.paths.nft_address_token_id_trades.get import GetNftTradesByToken
from openapi_evm_api.paths.wallets_address_nfts_trades.get import GetNftTradesByWallet
from openapi_evm_api.paths.nft_address_traits.get import GetNftTraitsByCollection
from openapi_evm_api.paths.nft_address_traits_paginate.get import GetNftTraitsByCollectionPaginate
from openapi_evm_api.paths.nft_address_token_id_transfers.get import GetNftTransfers
from openapi_evm_api.paths.block_block_number_or_hash_nft_transfers.get import GetNftTransfersByBlock
from openapi_evm_api.paths.nft_transfers.get import GetNftTransfersFromToBlock
from openapi_evm_api.paths.address_nft_collections.get import GetWalletNftCollections
from openapi_evm_api.paths.address_nft_transfers.get import GetWalletNftTransfers
from openapi_evm_api.paths.address_nft.get import GetWalletNfts
from openapi_evm_api.paths.nft_address_token_id_metadata_resync.get import ReSyncMetadata
from openapi_evm_api.paths.nft_address_traits_resync.get import ResyncNftRarity
from openapi_evm_api.paths.nft_address_sync.put import SyncNftContract


Expand All @@ -52,13 +55,16 @@ class NftApi(
GetNftTrades,
GetNftTradesByToken,
GetNftTradesByWallet,
GetNftTraitsByCollection,
GetNftTraitsByCollectionPaginate,
GetNftTransfers,
GetNftTransfersByBlock,
GetNftTransfersFromToBlock,
GetWalletNftCollections,
GetWalletNftTransfers,
GetWalletNfts,
ReSyncMetadata,
ResyncNftRarity,
SyncNftContract,
):
"""NOTE: This class is auto generated by OpenAPI Generator
Expand Down
Loading

0 comments on commit db1f794

Please sign in to comment.