Exemple #1
0
 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
Exemple #2
0
 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
Exemple #3
0
 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
Exemple #4
0
 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