Skip to content

Commit 03d9e09

Browse files
committed
feat: implement lambda changes
1 parent 6db164d commit 03d9e09

File tree

13 files changed

+30
-38
lines changed

13 files changed

+30
-38
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,6 @@ This returns a list of [ENS Records](https://github.com/TransposeData/transpose-
243243
```
244244

245245
## Links
246-
- [SDK Examples](https://github.com/TransposeData/transpose-python-sdk/tree/main/examples)
246+
- [SDK Examples](https://github.com/TransposeData/transpose-python-sdk/tree/main/demo)
247247
- [Transpose Documentation](https://docs.transpose.io)
248248
- [Official Discord Server](https://discord.gg/AKguqp3U57)

docs/ens.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The **ENS API** provides endpoints for looking up ENS names (both historical and
77
The **ENS API** supports the following groups of endpoints:
88

99
1. [Record Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/ens.md#Record-Endpoints): Retrieve any ENS record ever created by account, owner, name, node, registration date, expiration date and more.
10-
2. [Transfer Activity Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/ens.md#Transfer-Activity-Endpoints): Retrieve all historical and live ENS name transfers and registrations.
10+
2. [Transfer Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/ens.md#Transfer-Endpoints): Retrieve all historical and live ENS name transfers and registrations.
1111

1212

1313
# Endpoint Specifications
@@ -49,7 +49,7 @@ The **ENS Record Model** contains the full set of information for a single ENS n
4949
</details>
5050

5151

52-
## Transfer Activity Endpoints
52+
## Transfer Endpoints
5353
| SDK Method | Endpoint URL | Returns |
5454
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------- | ------------------- |
5555
| `ens.transfers_by_name(ens_name, transferred_after, transferred_before, transfer_category, order, limit)` | `GET /v0/ens/ens-transfers-by-name` | `List[ENSTransfer]` |

docs/nft.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The **NFT API** supports the following groups of endpoints:
1010

1111
1. [Collection Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/nft.md#Collection-Endpoints): Retrieve any NFT collection using flexible queries, along with collection metadata and images.
1212
2. [NFT Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/nft.md#NFT-Endpoints): Retrieve any NFT in existence and rich NFT metadata and media, by date minted, collection, owner, and more.
13-
3. [Sale Activity Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/nft.md#Sale-Endpoints): Retrieve any NFT sale given an account, collection, or date range across many decentralized exchanges.
13+
3. [Sale Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/nft.md#Sale-Endpoints): Retrieve any NFT sale given an account, collection, or date range across many decentralized exchanges.
1414
4. [Owner Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/nft.md#Owner-Endpoints): Retrieve all owners for a particular collection or NFT (supports fungible balances for ERC-1155s).
1515
5. [Transfer Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/nft.md#Transfer-Endpoints): Retrieve all transfers, including mints, sends, and burns, for any collection, NFT, or individual account.
1616

@@ -57,10 +57,10 @@ The **Collection Model** represents a single NFT collection. The **Collection Mo
5757

5858
| SDK Method | Endpoint URL | Returns |
5959
| ----------------------------------------------------------------------------------------------------------- | -------------------------------------- | -------------------- |
60-
| `nft.nfts_by_date_minted(minted_after, minted_before, contract_address, include_burned_nfts, order, limit)` | `GET /v0/nft/nfts-by-date-minted` | `List[NFT]` |
61-
| `nft.nfts_by_contract_address(contract_addresses, include_burned_nfts, limit)` | `GET /v0/nft/nfts-by-contract-address` | `List[NFT]` |
62-
| `nft.nfts_by_token_id(contract_addresses, token_ids, include_burned_nfts, limit)` | `GET /v0/nft/nfts-by-token-id` | `List[NFT]` |
63-
| `nft.nfts_by_name(name, include_burned_nfts, limit, fuzzy)` | `GET /v0/nft/nfts-by-name` | `List[NFT]` |
60+
| `nft.nfts_by_date_minted(minted_after, minted_before, contract_address, order, limit)` | `GET /v0/nft/nfts-by-date-minted` | `List[NFT]` |
61+
| `nft.nfts_by_contract_address(contract_addresses, limit)` | `GET /v0/nft/nfts-by-contract-address` | `List[NFT]` |
62+
| `nft.nfts_by_token_id(contract_addresses, token_ids, limit)` | `GET /v0/nft/nfts-by-token-id` | `List[NFT]` |
63+
| `nft.nfts_by_name(name, limit, fuzzy)` | `GET /v0/nft/nfts-by-name` | `List[NFT]` |
6464
| `nft.nfts_by_owner(owner_address, contract_address, limit)` | `GET /v0/nft/nfts-by-owner` | `List[NFTWithOwner]` |
6565

6666
### NFT Model

docs/token.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ The **Token API** provides endpoints for retrieving any token, token balance, tr
88

99
The **Token API** supports the following groups of endpoints:
1010

11-
1. [Token Info Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/token.md#Token-Info-Endpoints): Retrieve any token ever created using flexible queries, along with token metadata and symbols.
11+
1. [Token Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/token.md#Token-Endpoints): Retrieve any token ever created using flexible queries, along with token metadata and symbols.
1212
2. [Owner Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/token.md#Owner-Endpoints): Retrieve all owners and owner balances for a token (ordered by balance).
1313
3. [Transfer Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/token.md#Transfer-Endpoints): Retrieve all transfers, including mints, sends, and burns, for any token or individual account.
14-
4. [Swap Activity Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/token.md#Swap-Activity-Endpoints): Retrieve all swaps for any token, account, or date range across all decentralized exchanges.
14+
4. [Swap Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/token.md#Swap-Endpoints): Retrieve all swaps for any token, account, or date range across all decentralized exchanges.
1515
5. [Native Token Endpoints](https://github.com/TransposeData/transpose-python-sdk/blob/main/docs/token.md#Native-Token-Endpoints): Retrieve all native token transfers and balances for any account.
1616

1717
# Endpoint Specifications
1818

19-
## Token Info Endpoints
19+
## Token Endpoints
2020

2121
| SDK Method | Endpoint URL | Returns |
2222
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------ | ---------------------- |
@@ -131,7 +131,7 @@ The **Token Transfer Model** represents a single token transfer. The **Token Tra
131131

132132
</details>
133133

134-
## Swap Activity Endpoints
134+
## Swap Endpoints
135135

136136
| SDK Method | Endpoint URL | Returns |
137137
| ----------------------------------------------------------------------------------------------- | -------------------------------- | ------------ |

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# version compliant with PEP440
1010
# https://peps.python.org/pep-0440/
11-
version='2.0.0',
11+
version='2.0.2',
1212

1313
# project meta
1414
long_description = long_description,

tests/test_token_tokens_by_name.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ def test_cursor():
1616
try:
1717
api = Transpose(api_key)
1818

19-
collections = api.token.tokens_by_name(name='ape', fuzzy=True)
19+
collections = api.token.tokens_by_name(name='ape', fuzzy=True, limit=1)
2020

21-
assert len(collections) >= 10
21+
assert len(collections) >= 1
2222
assert all(collection.contract_address != None for collection in collections)
2323
assert api._next != None
2424

2525
collections = api.token.next()
26-
assert len(collections) >= 10
26+
assert len(collections) >= 1
2727
assert all(collection.contract_address != None for collection in collections)
2828

2929
except Exception:

tests/test_token_tokens_by_symbol.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ def test_cursor():
1616
try:
1717
api = Transpose(api_key)
1818

19-
collections = api.token.tokens_by_symbol(symbol='usd', fuzzy=True)
19+
collections = api.token.tokens_by_symbol(symbol='usd', fuzzy=True, limit=1)
2020

21-
assert len(collections) >= 10
21+
assert len(collections) >= 1
2222
assert all(collection.contract_address != None for collection in collections)
2323
assert api._next != None
2424

2525
collections = api.token.next()
26-
assert len(collections) >= 10
26+
assert len(collections) >= 1
2727
assert all(collection.contract_address != None for collection in collections)
2828

2929
except Exception:

transpose/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from os.path import join, dirname
33

44
from dotenv import load_dotenv
5-
load_dotenv(join(dirname(__file__), '.env'))
5+
load_dotenv()
66

77
api_key = os.environ.get("API_KEY")
88

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
from ..constants import NFT_API_ENDPOINTS
22

33
def _nfts_by_contract_address(contract_address: str = None,
4-
include_burned_nfts: bool = False,
54
limit: int = 10) -> str:
65

7-
base_url = '{}?contract_address={}&include_burned_nfts={}&limit={}'.format(NFT_API_ENDPOINTS['nfts_by_contract_address'], contract_address, include_burned_nfts, limit)
6+
base_url = '{}?contract_address={}&limit={}'.format(NFT_API_ENDPOINTS['nfts_by_contract_address'], contract_address, limit)
87

98
return base_url

transpose/src/api/nft/_nfts_by_date_minted.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
def _nfts_by_date_minted(minted_after: str or int = '1970-01-01 00:00:00',
44
minted_before: str or int = '2050-01-01 00:00:00',
55
contract_address: str = None,
6-
include_burned_nfts: bool = False,
76
order: str = 'asc',
87
limit: int = 10) -> str:
98

10-
base_url = '{}?minted_after={}&minted_before={}&include_burned_nfts={}&order={}&limit={}'.format(NFT_API_ENDPOINTS['nfts_by_date_minted'], minted_after, minted_before, include_burned_nfts, order, limit)
9+
base_url = '{}?minted_after={}&minted_before={}&order={}&limit={}'.format(NFT_API_ENDPOINTS['nfts_by_date_minted'], minted_after, minted_before, order, limit)
1110

1211
if contract_address != None:
1312
base_url += '&contract_address={}'.format(contract_address)

0 commit comments

Comments
 (0)