def get_item(self, item_url, force_download=False):
        """ Retrieve the item metadata from the server, as an Item object

        :type item_url: String or Item
        :param item_url: URL of the item, or an Item object

        :rtype: Item
        :returns: the corresponding metadata, as an Item object
        :type force_download: Boolean
        :param force_download: True to download from the server
            regardless of the cache's contents

        :raises: APIError if the API request is not successful


        """
        item_url = str(item_url)

        if (self.use_cache and
                not force_download and
                self.cache.has_item(item_url)):
            item_json = self.cache.get_item(item_url)
        else:
            item_json = self.api_request(item_url, raw=True)
            if self.update_cache:
                self.cache.add_item(item_url, item_json)

        return Item(json.loads(item_json.decode('utf-8')), self)
def get_item ( self , item_url , force_download = False ) : item_url = str ( item_url ) if ( self . use_cache and not force_download and self . cache . has_item ( item_url ) ) : item_json = self . cache . get_item ( item_url ) else : item_json = self . api_request ( item_url , raw = True ) if self . update_cache : self . cache . add_item ( item_url , item_json ) return Item ( json . loads ( item_json . decode ( 'utf-8' ) ) , self )
Retrieve the item metadata from the server, as an Item object

        :type item_url: String or Item
        :param item_url: URL of the item, or an Item object

        :rtype: Item
        :returns: the corresponding metadata, as an Item object
        :type force_download: Boolean
        :param force_download: True to download from the server
            regardless of the cache's contents

        :raises: APIError if the API request is not successful