示例#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
示例#2
0
文件: base.py 项目: Lt-Pone/hue
 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
示例#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
示例#4
0
文件: base.py 项目: Lt-Pone/hue
 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