Rewards2/Dhanny_reward2/run.py
def create_urls(address):
    """
    Creates the list of url for the different pages on the api

    `Required`
    :param str address:     Address to use for the creation of the url
    """
    urls = []
    url = string.Template("https://indexer.algoexplorerapi.io/rl/v1/transactions?page=${page}&&limit=10&&address=${address}")
    log(f"Getting number of pages for {address}...", "info")
    response = requests.get(url.substitute(page=1, address=address))
    if response.status_code == 200:
        text = response.json()
        total_pages = text["num-total-pages"]
        log(f"Gotten total pages of {total_pages}")
        for i in range(total_pages):
            log(f"Creating url for page {i + 1}...")
            urls.append(url.substitute(page=i+1, address=address))
        return urls
    print(f"Error {response.status_code} occured in retrieving info.\nProbably Invalid wallet address")
    exit(1)

    Creates the list of url for the different pages on the api

    `Required`
    :param str address:     Address to use for the creation of the url
    
Creates the list of url for the different pages on the api
`Required`
Creates the list of url for the different pages on the api ` Required `
def create_urls(address):
    urls = []
    url = string.Template("https://indexer.algoexplorerapi.io/rl/v1/transactions?page=${page}&&limit=10&&address=${address}")
    log(f"Getting number of pages for {address}...", "info")
    response = requests.get(url.substitute(page=1, address=address))
    if response.status_code == 200:
        text = response.json()
        total_pages = text["num-total-pages"]
        log(f"Gotten total pages of {total_pages}")
        for i in range(total_pages):
            log(f"Creating url for page {i + 1}...")
            urls.append(url.substitute(page=i+1, address=address))
        return urls
    print(f"Error {response.status_code} occured in retrieving info.\nProbably Invalid wallet address")
    exit(1)
def create_urls ( address ) : urls = [ ] url = string . Template ( "https://indexer.algoexplorerapi.io/rl/v1/transactions?page=${page}&&limit=10&&address=${address}" ) log ( f"Getting number of pages for {address}..." , "info" ) response = requests . get ( url . substitute ( page = 1 , address = address ) ) if response . status_code == 200 : text = response . json ( ) total_pages = text [ "num-total-pages" ] log ( f"Gotten total pages of {total_pages}" ) for i in range ( total_pages ) : log ( f"Creating url for page {i + 1}..." ) urls . append ( url . substitute ( page = i + 1 , address = address ) ) return urls print ( f"Error {response.status_code} occured in retrieving info.\nProbably Invalid wallet address" ) exit ( 1 )
Creates the list of url for the different pages on the api
`Required`
Creates the list of url for the different pages on the api ` Required `
"""
    Creates the list of url for the different pages on the api

    `Required`
    :param str address:     Address to use for the creation of the url
    """
address
Address to use for the creation of the url
Address to use for the creation of the url