Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

user info / history endpoints

  • Loading branch information...
commit a7e5a7c9108c88b2be2ce3ab6c81d13959b56c53 1 parent 718bb72
Hilary Mason authored
Showing with 21 additions and 0 deletions.
  1. +21 −0 bitly_api/bitly_api.py
View
21 bitly_api/bitly_api.py
@@ -237,6 +237,11 @@ def user_tracking_domain_shorten_counts(self, domain, **kwargs):
data = self._call_oauth2_metrics("v3/user/tracking_domain_shorten_counts", params, **kwargs)
return data["tracking_domain_shorten_counts"]
+ def user_info(self, **kwargs):
+ """return or update info about a user"""
+ data = self._call_oauth2_metrics("v3/user/info", dict(), **kwargs)
+ return data
+
def user_link_history(self, created_before=None, created_after=None, archived=None, limit=None, offset=None):
params = dict()
if created_before is not None:
@@ -256,6 +261,22 @@ def user_link_history(self, created_before=None, created_after=None, archived=No
params["offset"] = str(offset)
data = self._call_oauth2("v3/user/link_history", params)
return data["link_history"]
+
+ def user_network_history(self, offset=None, expand_client_id=False, limit=None, expand_user=False):
+ params = dict()
+ if expand_client_id is True:
+ params["expand_client_id"] = "true"
+ if expand_user is True:
+ params["expand_user"] = "true"
+ if offset is not None:
+ assert isinstance(offset, int)
+ params["offset"] = str(offset)
+ if limit is not None:
+ assert isinstance(limit, int)
+ params["limit"] = str(limit)
+ data = self._call_oauth2("v3/user/network_history", params)
+ return data
+
def info(self, hash=None, shortUrl=None, link=None):
""" return the page title for a given bitly link """
Please sign in to comment.
Something went wrong with that request. Please try again.