aPRAWBase

aPRAWBase is the base class used by most Reddit models to self-assign data retrieved from respective endpoints. It is used by classes such as Submission and Comment.

class apraw.models.aPRAWBase(reddit: Reddit, data: Dict[str, Any] = None, kind: str = '')

The base class for Reddit models.

The aPRAWBase class stores data retrieved by the endpoints and automatically assigns it as attributes. Specific information about the aforementioned attributes can be found in the respective implementations such as Comment.

kind: str

The item’s kind / type.

async fetch()

Fetch this item’s information from a suitable API endpoint.

Returns

self – The updated model.

Return type

aPRAWBase

property fullname

Get the ID prepended with its kind.

Returns

fullname – The item’s ID prepended with its kind such as t1_.

Return type

str