def read_items(self, buckets=None, results=15, start=0,item_ids=None):
        """
        Returns data from the catalog; also expanded for the requested buckets.
        This method is provided for backwards-compatibility

        Args:

        Kwargs:
            buckets (list): A list of strings specifying which buckets to retrieve

            results (int): An integer number of results to return

            start (int): An integer starting value for the result set

        Returns:
            A list of objects in the catalog; list contains additional attributes 'start' and 'total'

        Example:

        >>> c
        <catalog - my_songs>
        >>> c.read_items(results=1)
        [<song - Harmonice Mundi II>]
        >>>
        """
        warnings.warn("catalog.read_items() is depreciated. Please use catalog.get_item_dicts() instead.")
        kwargs = {}
        kwargs['bucket'] = buckets or []
        kwargs['item_id'] = item_ids or []
        response = self.get_attribute("read", results=results, start=start, **kwargs)
        rval = ResultList([])
        if item_ids:
            rval.start=0;
            rval.total=len(response['catalog']['items'])
        else:
            rval.start = response['catalog']['start']
            rval.total = response['catalog']['total']
        for item in response['catalog']['items']:
            new_item = None
            # song items
            if 'song_id' in item:
                item['id'] = item.pop('song_id')
                item['title'] = item.pop('song_name')
                request = item['request']
                new_item = song.Song(**util.fix(item))
                new_item.request = request
            # artist item
            elif 'artist_id' in item:
                item['id'] = item.pop('artist_id')
                item['name'] = item.pop('artist_name')
                request = item['request']
                new_item = artist.Artist(**util.fix(item))
                new_item.request = request
            # unresolved item
            else:
                new_item = item
            rval.append(new_item)
        return rval
def read_items ( self , buckets = None , results = 15 , start = 0 , item_ids = None ) : warnings . warn ( "catalog.read_items() is depreciated. Please use catalog.get_item_dicts() instead." ) kwargs = { } kwargs [ 'bucket' ] = buckets or [ ] kwargs [ 'item_id' ] = item_ids or [ ] response = self . get_attribute ( "read" , results = results , start = start , ** kwargs ) rval = ResultList ( [ ] ) if item_ids : rval . start = 0 ; rval . total = len ( response [ 'catalog' ] [ 'items' ] ) else : rval . start = response [ 'catalog' ] [ 'start' ] rval . total = response [ 'catalog' ] [ 'total' ] for item in response [ 'catalog' ] [ 'items' ] : new_item = None if 'song_id' in item : item [ 'id' ] = item . pop ( 'song_id' ) item [ 'title' ] = item . pop ( 'song_name' ) request = item [ 'request' ] new_item = song . Song ( ** util . fix ( item ) ) new_item . request = request elif 'artist_id' in item : item [ 'id' ] = item . pop ( 'artist_id' ) item [ 'name' ] = item . pop ( 'artist_name' ) request = item [ 'request' ] new_item = artist . Artist ( ** util . fix ( item ) ) new_item . request = request else : new_item = item rval . append ( new_item ) return rval
Returns data from the catalog; also expanded for the requested buckets.
        This method is provided for backwards-compatibility

        Args:

        Kwargs:
            buckets (list): A list of strings specifying which buckets to retrieve

            results (int): An integer number of results to return

            start (int): An integer starting value for the result set

        Returns:
            A list of objects in the catalog; list contains additional attributes 'start' and 'total'

        Example:

        >>> c
        <catalog - my_songs>
        >>> c.read_items(results=1)
        [<song - Harmonice Mundi II>]
        >>>