Skip to content

Commit

Permalink
Merge pull request #8 from blockfrost/fix-endpoints
Browse files Browse the repository at this point in the history
Fix epoch_pool_blocks endpoint
  • Loading branch information
mathiasfrohlich authored Nov 23, 2021
2 parents 4b391a7 + ce6f949 commit 8f9885b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion blockfrost/api/cardano/epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def epoch_pool_blocks(self, number: int, pool_id: str, **kwargs):
:raises Exception: If the API response is somehow malformed.
"""
return requests.get(
url=f"{self.url}/epochs/{number}/stakes/{pool_id}/blocks",
url=f"{self.url}/epochs/{number}/blocks/{pool_id}",
params=self.query_parameters(kwargs),
headers=self.default_headers
)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='blockfrost-python',
version='0.3.2',
version='0.3.3',
description='The official Python SDK for Blockfrost API v0.1.32',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cardano_epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def test_epoch_pool_blocks(requests_mock):
"38bc6efb92a830a0ed22a64f979d120d26483fd3c811f6622a8c62175f530878",
"f3258fcd8b975c061b4fcdcfcbb438807134d6961ec278c200151274893b6b7d"
]
requests_mock.get(f"{api.url}/epochs/{epoch}/stakes/{pool_id}/blocks", json=mock_data)
requests_mock.get(f"{api.url}/epochs/{epoch}/blocks/{pool_id}", json=mock_data)
mock_object = mock_data
assert api.epoch_pool_blocks(number=epoch, pool_id=pool_id) == mock_object

Expand Down

0 comments on commit 8f9885b

Please sign in to comment.