backoff icon indicating copy to clipboard operation
backoff copied to clipboard

How do I use this?

Open wprojects opened this issue 1 year ago • 0 comments

I have an api I'm trying to hit with the code below. How do I implement this code I have into backoff? I don't see any example and I'm confused on how to apply this to my code

daily = "min_time=-1%20day&bucket=day" weekly = "min_time=-1%20week&bucket=week" monthly = "min_time=-4%20week&bucket=week" headers = {'User-Agent': 'a1projects/1.0'} url = "https://api.helium.io/v1/hotspots/" + address +"/rewards/sum?"+daily response = r.get(url, headers=headers)#.json() if str(response) == "<Response [200]>": time.sleep(.6) response = response.json() data = response['data'][0] daily_rewards = data['total'] daily_rewards = f"{daily_rewards:.2f}"

wprojects avatar Nov 03 '22 14:11 wprojects