-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add chain arg to client; test: add missing tests
- Loading branch information
1 parent
6b549d5
commit 40e897b
Showing
8 changed files
with
73 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
class SimpleEnum: | ||
@classmethod | ||
def all(cls) -> list[str]: | ||
return [v for k, v in cls.__dict__.items() if not k.startswith("__")] | ||
|
||
|
||
class BirdEyeApiUrls: | ||
# DEFI | ||
DEFI_PRICE = "defi/price" | ||
DEFI_TOKEN_LIST = "defi/tokenlist" | ||
DEFI_HISTORY_PRICE = "defi/history_price" | ||
|
||
|
||
class BirdEyeChain(SimpleEnum): | ||
# Solana | ||
SOLANA = "solana" | ||
ETHEREUM = "ethereum" | ||
BSC = "bsc" | ||
AVALANCHE = "avalanche" | ||
ARBITRUM = "arbitrum" | ||
OPTIMISM = "optimism" | ||
POLYGON = "polygon" | ||
BASE = "base" | ||
ZKSYNC = "zksync" | ||
SUI = "sui" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from birdeyepy.utils.helpers import as_api_args | ||
|
||
|
||
def test_as_api_args_with_list() -> None: | ||
# Arrange | ||
@as_api_args | ||
def uat_function(ids: str | list) -> None: | ||
assert ids == "a,b,c" | ||
|
||
# Assert | ||
uat_function(ids=["a", "b", "c"]) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.