pytan3.api_models.
ApiItem
(**kwargs)[source]¶Bases: pytan3.api_models.ApiModel
Model for a complex item in the API.
API_LIST_API_NAME
= None¶str
– Name of API_LIST_CLS
used in API calls.
__init__
(**kwargs)[source]¶Constructor.
Parameters: | **kwargs – Set and checked using ApiModel.api_attrs() . |
---|
__len__
()[source]¶Return number of ApiModel.api_attrs()
that are not None.
Returns: | int |
---|
__str__
()[source]¶Show object info using ApiModel.api_attrs_str()
.
Returns: | str |
---|
__repr__
()[source]¶Show object info using ApiModel.api_attrs_repr()
.
Returns: | str |
---|
__setattr__
(attr, value)[source]¶Enforce type using ApiModel.api_coerce_value()
.
serialize
(empty=False, list_attrs=False, exclude_attrs=None, only_attrs=None, wrap_name=True, wrap_item_attr=True)[source]¶Serialize this object into a dict.
Parameters: |
|
---|
Notes
All child objects will get wrap_name=False.
Returns: | dict |
---|