Rewards2/teepy_rewards2/scrapper.py
def _algoscan(self, address: str, pages: Union[int, None]=None) -> List:
        """
        Makes a request to algoScan API to fetch transaction data for the given address.

        Args:
            - address: desired address for transaction data
            - pages: desired number of pages for response[can be skipped to fetch all pages]
        Returns:
            - List[{}]: A list of transaction data for the given address
        """
        data = []
        offset = 0
        page = 0
        while True:
            if pages:
                if page == pages:
                    break
            res = requests.get(f"{self.api_base_url}{address}?offset={offset}")
            dat = res.json()
            if dat == []:
                break
            data.extend(list(map(lambda item: {'from': item['sender'], 'amount': item['amount']}, dat)))
            page += 1
            offset += 20
        return data

        Makes a request to algoScan API to fetch transaction data for the given address.

        Args:
            - address: desired address for transaction data
            - pages: desired number of pages for response[can be skipped to fetch all pages]
        Returns:
            - List[{}]: A list of transaction data for the given address
        
Makes a request to algoScan API to fetch transaction data for the given address.
Makes a request to algoScan API to fetch transaction data for the given address .
def _algoscan(self, address: str, pages: Union[int, None]=None) -> List:
        data = []
        offset = 0
        page = 0
        while True:
            if pages:
                if page == pages:
                    break
            res = requests.get(f"{self.api_base_url}{address}?offset={offset}")
            dat = res.json()
            if dat == []:
                break
            data.extend(list(map(lambda item: {'from': item['sender'], 'amount': item['amount']}, dat)))
            page += 1
            offset += 20
        return data
def _algoscan ( self , address : str , pages : Union [ int , None ] = None ) -> List : data = [ ] offset = 0 page = 0 while True : if pages : if page == pages : break res = requests . get ( f"{self.api_base_url}{address}?offset={offset}" ) dat = res . json ( ) if dat == [ ] : break data . extend ( list ( map ( lambda item : { 'from' : item [ 'sender' ] , 'amount' : item [ 'amount' ] } , dat ) ) ) page += 1 offset += 20 return data
Makes a request to algoScan API to fetch transaction data for the given address.
Makes a request to algoScan API to fetch transaction data for the given address .
"""
        Makes a request to algoScan API to fetch transaction data for the given address.

        Args:
            - address: desired address for transaction data
            - pages: desired number of pages for response[can be skipped to fetch all pages]
        Returns:
            - List[{}]: A list of transaction data for the given address
        """
A list of transaction data for the given address
A list of transaction data for the given address
- List[{}]
self
address
str
pages
Union[int, None]
- address
desired address for transaction data
desired address for transaction data
- pages
desired number of pages for response[can be skipped to fetch all pages]
desired number of pages for response [ can be skipped to fetch all pages ]