In api/cardano/epochs.py we have the method epoch_latest_parameters defined two times, the first one with the right definition:
@request_wrapper
def epoch_latest_parameters(self, **kwargs):
"""
Return the protocol parameters for the latest epoch.
https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1latest~1parameters/get
:param return_type: Optional. "object", "json" or "pandas". Default: "object".
:type return_type: str
:returns object.
:rtype: Namespace
:raises ApiError: If API fails
:raises Exception: If the API response is somehow malformed.
"""
return requests.get(
url=f"{self.url}/epochs/latest/parameters",
headers=self.default_headers
)
This doesn't require any integer parameter, because it will get the latest parameter.
The second definition, though, I suppose is wrong
@request_wrapper
def epoch_latest_parameters(self, number: int, **kwargs):
"""
Return the protocol parameters for the epoch specified.
https://docs.blockfrost.io/#tag/Cardano-Epochs/paths/~1epochs~1{number}~1parameters/get
:param number: Number of the epoch.
:type number: int
:param return_type: Optional. "object", "json" or "pandas". Default: "object".
:type return_type: str
:returns object.
:rtype: Namespace
:raises ApiError: If API fails
:raises Exception: If the API response is somehow malformed.
"""
return requests.get(
url=f"{self.url}/epochs/{number}/parameters",
headers=self.default_headers
)
It requires an integer and will get the parameters from this specific epoch.
I suppose this is a mistake and the last name should be something like "epoch_parameters".
Thanks for bringing this to my attention.
The one with a function parameter should really be named epoch_protocol_parameters.
This will be changed in the next version.
In api/cardano/epochs.py we have the method epoch_latest_parameters defined two times, the first one with the right definition:
This doesn't require any integer parameter, because it will get the latest parameter.
The second definition, though, I suppose is wrong
It requires an integer and will get the parameters from this specific epoch.
I suppose this is a mistake and the last name should be something like "epoch_parameters".