Skip to content
This repository was archived by the owner on Apr 9, 2021. It is now read-only.

Get user_shorten_counts key from data[] in user_shorten_counts method rather than missing shorten_counts key - #31

Merged
jehiah merged 1 commit into
bitly:masterfrom
jazwiecki:master
Jul 30, 2014
Merged

jehiah merged 1 commit into
bitly:masterfrom
jazwiecki:master

Conversation

@jazwiecki

Copy link
Copy Markdown

http://dev.bitly.com/user_metrics.html#v3_user_shorten_counts says the returned json will have the authenticated user's shorten counts listed under "user_shorten_counts", but the current module is looking for them in shorten_counts:

>>> c.user_shorten_counts()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "./bitly_api/bitly_api.py", line 289, in user_shorten_counts
    return data["shorten_counts"]
KeyError: 'shorten_counts'

@jazwiecki jazwiecki changed the title fetch the right key from bit.ly based on http://dev.bitly.com/user_metrics.html#v3_user_shorten_counts Get user_shorten_counts key from data[] in user_shorten_counts method rather than missing shorten_counts key Jul 30, 2014
jehiah added a commit that referenced this pull request Jul 30, 2014
Get user_shorten_counts key from data[] in user_shorten_counts method rather than missing shorten_counts key
@jehiah
jehiah merged commit 8f51e77 into bitly:master Jul 30, 2014
deletedcu added a commit to deletedcu/bitly-api-python that referenced this pull request May 17, 2019
Get user_shorten_counts key from data[] in user_shorten_counts method rather than missing shorten_counts key
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants