Model¶
Unified event class¶
When returning resultsets containing EPG or timer items the dict
derived class enigma2_http_api.model.EEvent
is used.
EEvent attribute | epg | timer | movie |
---|---|---|---|
duration [2] | duration_sec | – n/a – | length |
item_id | id | eit | – n/a – |
longinfo | longdesc | descriptionextended | descriptionExtended |
service_name | sname | servicename | servicename |
service_reference | sref | serviceref | serviceref |
shortinfo | shortdesc | description | description |
start_time [1] | begin_timestamp | begin | recordingtime |
stop_time [1] | – n/a – | end | – n/a – |
title | title | name | eventname |
Footnotes
[1] | (1, 2) datetime.datetime instances. |
[2] | datetime.timedelta instances. |
Model classes and constants.¶
-
enigma2_http_api.model.
DEFAULT_LOCALTIMEZONE
= 'Europe/Berlin'¶ default/fallback value for local timezone as the enigma2 API returns localised timestamps (not UTC!) one need to set the correct timezone or the results will not match the values shown on the enigma2 device.
-
enigma2_http_api.model.
DT_FORMAT__REAL__KEYS
= '%d.%m.%Y %H:%M'¶ datetime format as used for realbegin/realend key/value pairs of timer items returned by enigma2 API
-
class
enigma2_http_api.model.
EEvent
(*args, **kwargs)[source]¶ This is a thin wrapper class to allow unified access to event items’ data.
As the data keys for EPG and timer events (returned by the enigma2 API) are different for the same data values the data is exposed as attributes common to all item types.
Attribute names are inspired by names used in the ETSI EPG specification documents.
- ETSI EN 300 707 V1.2.1 (2002-12)
- ETSI ETR 288 TECHNICAL October 1996
-
enigma2_http_api.model.
ITEM_TYPE_EPG
= 'epg'¶ type identifier for EPG items
-
enigma2_http_api.model.
ITEM_TYPE_MOVIE
= 'movie'¶ type identifier for MOVIE items
-
enigma2_http_api.model.
ITEM_TYPE_TIMER
= 'timer'¶ type identifier for timer items