APIResource¶
- class xbrl_filings_api.APIResource¶
Bases:
APIObjectBase class for JSON:API resources, i.e., data objects.
Subclasses of this class may be read into a database. An instance resembles a database record.
This library assumes the API returning datetimes in UTC, if no timezone is specified (situation as of April 2024). Original datetime string is retained in attribute with
"_time_str"ending paired with the"_time"ended attributes (e.g.added_time_str).Methods
get_data_attributes([flags, filings])Return data attributes for an
APIResource.__hash__()Return hash of
('APIResource', cls.TYPE, self.api_id).__repr__()Return repr(self).
__str__()Return str(self).
Attributes
JSON-API resource
idofAPIResource.query_timeTime when the query function was called for an
APIObject.request_urlHTTP request URL for an
APIObject.- TYPE: str = ''¶
JSON-API resource
typeofAPIResourcesubclass.
- api_id: str¶
JSON-API resource
idofAPIResource.Can be used as a unique identifier among resources of the same type.
- classmethod get_data_attributes(flags=None, filings=None)¶
Return data attributes for an
APIResource.Excludes internal and class attributes and the ones containing objects.
For
Filingobjects this also means excluding attributes ending_download_pathif every filing in parameterfilingshave this attribute asNone. Additionally, ifGET_ENTITYis not included in parameterflags, returned attribute list will excludeentity_api_id.
- __hash__()¶
Return hash of
('APIResource', cls.TYPE, self.api_id).