def get_links(self): resp_dict = self._root.get('%s/links' % API_VERSION, headers=self.headers) links = [Link.from_dict(link_dict) for link_dict in resp_dict['links']] return links
def get_link(self, link_id): resp_dict = self._root.get('%s/link/%d/' % (API_VERSION, link_id), headers=self.headers) if resp_dict['link']: return Link.from_dict(resp_dict['link']) return None