diff --git a/koios_python/epoch.py b/koios_python/epoch.py index a0c70f9..73bb19a 100644 --- a/koios_python/epoch.py +++ b/koios_python/epoch.py @@ -6,22 +6,22 @@ import requests def get_epoch_info(self, epoch_no=None): - """ - Get the epoch information, all epochs if no epoch specified. - - :param int epoch_no: epoch number to fetch details for. - :return: list of detailed summary for each epoch. - :rtype: list - """ - if epoch_no is None: - info = requests.get(self.EPOCH_INFO_URL, timeout=10) - print(self.EPOCH_INFO_URL) - info = json.loads(info.content) - else: - info = requests.get(f"{self.EPOCH_INFO_URL}?_epoch_no={epoch_no}", timeout=10) - print(self.EPOCH_INFO_URL) - info = json.loads(info.content) - return info + """ + Get the epoch information, all epochs if no epoch specified. + + :param int epoch_no: epoch number to fetch details for. + :return: list of detailed summary for each epoch. + :rtype: list + """ + if epoch_no is None: + info = requests.get(self.EPOCH_INFO_URL, timeout=10) + print(self.EPOCH_INFO_URL) + info = json.loads(info.content) + else: + info = requests.get(f"{self.EPOCH_INFO_URL}?_epoch_no={epoch_no}", timeout=10) + print(self.EPOCH_INFO_URL) + info = json.loads(info.content) + return info def get_epoch_params(self, epoch_no=None): @@ -41,6 +41,7 @@ def get_epoch_params(self, epoch_no=None): info = json.loads(info.content) return info + def get_epoch_block_protocols(self, epoch_no=None): """ Get the information about block protocol distribution in epoch @@ -56,4 +57,3 @@ def get_epoch_block_protocols(self, epoch_no=None): info = requests.get(f"{self.EPOCH_BLOCKS_URL}?_epoch_no={epoch_no}", timeout=10) info = json.loads(info.content) return info -