|
def _generate_api_query_payload(self, scan_interval, device_tz): |
In order to use a custom payload, it's useful to have the known good reference, provided by the _generate_api_query_payload.
Considering that the payload is needed to initialize FlumeData itself, the methos providing such a collection of queries should be a class method.
Fortunately, _generate_api_query_payload does not use self, so it's just a matter of renaming it, and adding @classmethod decorator.
PyFlume/pyflume/data.py
Line 143 in 636dca9
In order to use a custom payload, it's useful to have the known good reference, provided by the
_generate_api_query_payload.Considering that the payload is needed to initialize
FlumeDataitself, the methos providing such a collection of queries should be a class method.Fortunately,
_generate_api_query_payloaddoes not useself, so it's just a matter of renaming it, and adding@classmethoddecorator.