def get_earnings_per_round(self, username):
r = requests.get('{0}/{1}'.format(self._users_url, username))
if r.status_code!=200:
return (None, r.status_code)
rj = r.json()
rewards = rj['rewards']
earnings = np.zeros(len(rewards))
for i in range(len(rewards)):
earnings[i] = rewards[i]['amount']
return (earnings, r.status_code)
评论列表
文章目录