Package entropy :: Package client :: Package services :: Module interfaces :: Class DocumentList

Class DocumentList

source code


DocumentList is a list object providing extra methods for obtaining extra document list statuses, such as the number of elements found, the current elements list offset, and if there are more elements on the remote service.

Instance Methods
new empty list
__init__(self, package_name, has_more, offset)
DocumentList constructor.
source code
string
package_name(self)
Return the package name bound to this object.
source code
int
offset(self)
Return the used offset for fetching this list.
source code
int
has_more(self)
Return the amount of documents available after those listed here.
source code

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __setitem__, __setslice__, __sizeof__, append, count, extend, index, insert, pop, remove, reverse, sort

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Class Variables

Inherited from list: __hash__

Properties

Inherited from object: __class__

Method Details

__init__(self, package_name, has_more, offset)
(Constructor)

source code 

DocumentList constructor.

Parameters:
  • package_name (string) - package name string
  • has_more (bool) - True, if there are more documents available
  • offset (int) - list offset used by remote service
Returns: new empty list
Overrides: object.__init__

package_name(self)

source code 

Return the package name bound to this object.

Returns: string
the package name

offset(self)

source code 

Return the used offset for fetching this list.

Returns: int
the used offset

has_more(self)

source code 

Return the amount of documents available after those listed here.

Returns: int
the amount of documents still available on the service, given the current offset