示例#1
0
 def add_item(self, collection_id, item_id, item_type):
     data = {
         'id': item_id,
         'type': item_type
     }
     response = self._request_put('collections/{}/items'.format(collection_id), data=data)
     return Item.construct_from(response)
示例#2
0
 def get(self, collection_id, include_all_items=False):
     params = {'include_all_items': include_all_items}
     response = self._request_get(
         'collections/{}/items'.format(collection_id), params=params)
     return [Item.construct_from(x) for x in response['items']]
示例#3
0
 def add_item(self, collection_id, item_id, item_type):
     data = {"id": item_id, "type": item_type}
     response = self._request_put(
         "collections/{}/items".format(collection_id), data=data)
     return Item.construct_from(response)