We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2aa187e commit 6129144Copy full SHA for 6129144
services/bitly.py
@@ -68,7 +68,10 @@ def stats(self, tinyurl):
68
jdata = json.loads(resp.read())
69
if jdata['status_code'] != 200:
70
raise ShortyError(jdata['errorMessage'])
71
- return str(jdata['data']['clicks'][0]['global_clicks'])
+ clicks = {}
72
+ clicks['user'] = jdata['data']['clicks'][0]['user_clicks']
73
+ clicks['global'] = jdata['data']['clicks'][0]['global_clicks']
74
+ return clicks
75
76
def qrcode(self, tinyurl):
77
qrdata = request(tinyurl + '.qrcode').read()
0 commit comments