Package cm_api :: Package endpoints :: Module types :: Class ApiList
[hide private]
[frames] | no frames]

Class ApiList

source code

   object --+    
            |    
BaseApiObject --+
                |
               ApiList
Known Subclasses:

A list of some api object

Instance Methods [hide private]
 
__init__(self, objects, resource_root=None, **attrs)
Initializes internal state and sets all known writable properties of the object to None.
source code
 
__str__(self)
Default implementation of __str__.
source code
 
to_json_dict(self, preserve_ro=False) source code
 
__len__(self) source code
 
__iter__(self) source code
 
__getitem__(self, i) source code
 
__getslice(self, i, j) source code

Inherited from BaseApiObject: __setattr__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __sizeof__, __subclasshook__

Class Methods [hide private]
 
from_json_dict(cls, dic, resource_root, member_cls=None) source code

Inherited from BaseApiObject (private): _get_attributes

Static Methods [hide private]

Inherited from BaseApiObject: init

Class Variables [hide private]
  LIST_KEY = 'items'

Inherited from BaseApiObject (private): _ATTRIBUTES, _WHITELIST

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, objects, resource_root=None, **attrs)
(Constructor)

source code 

Initializes internal state and sets all known writable properties of the object to None. Then initializes the properties given in the provided attributes dictionary.

Parameters:
  • resource_root - API resource object.
  • attrs - optional dictionary of attributes to set. This should only contain r/w attributes.
Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

Default implementation of __str__. Uses the type name and the first attribute retrieved from the attribute map to create the string.

Overrides: object.__str__
(inherited documentation)

to_json_dict(self, preserve_ro=False)

source code 
Overrides: BaseApiObject.to_json_dict

from_json_dict(cls, dic, resource_root, member_cls=None)
Class Method

source code 
Overrides: BaseApiObject.from_json_dict