Esempio n. 1
0
 def media_filter(self,
                  collection,
                  filter_name,
                  filter_values,
                  order=ORDER.ASCENDING):
     body = {"filter_values": filter_values}
     url = replace_url_params(ENDPOINT.FILTER, collection, filter_name,
                              order)
     return self._post(url, body)
Esempio n. 2
0
 def media_played(self, collection, media_id):
     url = replace_url_params(ENDPOINT.MEDIA_PLAYED, collection, media_id)
     return self._get(url)
Esempio n. 3
0
 def popular_media(self, collection):
     url = replace_url_params(ENDPOINT.POPULAR, collection)
     return self._get(url)
Esempio n. 4
0
 def media_filter(self, collection, filter_name, value):
     url = replace_url_params(ENDPOINT.FILTER, collection, filter_name,
                              value)
     return self._get(url)
Esempio n. 5
0
 def sort(self, collection, sort_type, order):
     return self._post(
         replace_url_params(ENDPOINT.SORT, collection, sort_type, order),
         None)
Esempio n. 6
0
 def watched(self, uuid):
     return self._post(replace_url_params(ENDPOINT.WATCHED, uuid), None)
Esempio n. 7
0
 def get_filter_values_count(self, collection, filter_name, filter_values):
     body = {"filter_values": filter_values}
     return self._post(
         replace_url_params(ENDPOINT.FILTER_COUNT, collection, filter_name),
         body)
Esempio n. 8
0
 def media_detail(self, collection, media_id):
     return self._post(
         replace_url_params(ENDPOINT.MEDIA_DETAIL, collection, media_id),
         None)
Esempio n. 9
0
 def media_played(self, collection, media_id, uuid):
     return self._post(
         replace_url_params(ENDPOINT.MEDIA_PLAYED, collection, media_id,
                            uuid), None)
Esempio n. 10
0
 def popular_media(self, collection):
     return self._post(replace_url_params(ENDPOINT.POPULAR, collection),
                       None)
 def get_latest_release(self):
     return self._get(replace_url_params(GITLAB_ENDPOINT.RELEASES, self.PROJECT_ID)).json()