Exemple #1
0
 def resolve_url(self, url):
     params = {'url': url}
     response = self._request(self._create_url('resolve'),
                              headers={'Accept': 'application/json'},
                              params=params)
     self._handle_error(response)
     return items.convert_to_item(response.json())
 def resolve_url(self, url):
     params = {'url': url}
     response = self._request(self._create_url('resolve'),
                              headers={'Accept': 'application/json'},
                              params=params)
     self._handle_error(response)
     return items.convert_to_item(response.json())
Exemple #3
0
 def get_user(self, user_id):
     # self.update_access_token()
     response = self._request(self._create_url('', user_id=user_id),
                              headers={'Accept': 'application/json'})
     self._handle_error(response)
     return items.convert_to_item(response.json())
Exemple #4
0
 def get_track(self, track_id):
     response = self._request(self._create_url('tracks/%s' %
                                               unicode(track_id)),
                              headers={'Accept': 'application/json'})
     self._handle_error(response)
     return items.convert_to_item(response.json())
 def get_track(self, track_id):
     response = self._request(self._create_url('tracks/%s' % unicode(track_id)),
                              headers={'Accept': 'application/json'})
     self._handle_error(response)
     return items.convert_to_item(response.json())
 def get_user(self, user_id):
     # self.update_access_token()
     response = self._request(self._create_url('', user_id=user_id),
                              headers={'Accept': 'application/json'})
     self._handle_error(response)
     return items.convert_to_item(response.json())