rankade.models.Base
Module Contents
Classes
Base class for all objects returned from the server. All models should inherit from this class. |
|
Base class for lists of items from server. |
|
Base class for page of items from server . |
Data
API
- class RankadeObject[source]
Bases:
abc.ABC
Base class for all objects returned from the server. All models should inherit from this class.
- class ResultList(initlist=None)[source]
Bases:
collections.UserList
[rankade.models.Base.T
],rankade.models.Base.RankadeObject
Base class for lists of items from server.
- Parameters:
data (List[rankade.models.Base.T]) – List of RankadeObjects returned by the sever.
Initialization
- _content_class: ClassVar[Type[RankadeObject]] = None
Classvar to be overridden on each subclass to allow the an object in the list to be created from a dict returned from the server.
- data: List[rankade.models.Base.T] = None
List of RankadeObjects returned by the sever.
- classmethod from_dict(data_dict: Union[MutableMapping[str, Any], MutableSequence[MutableMapping[str, Any]]])[source]
Create a ResultList instance from a dict.
- class Page(initlist=None)[source]
Bases:
rankade.models.Base.ResultList
[rankade.models.Base.T
]Base class for page of items from server .
- Parameters:
Initialization
- page: int = 'field(...)'
Page number
- totalPages: int = 'field(...)'
Total pages