def streams(self): """ Method for `List Data Streams <https://m2x.att.com/developer/documentation/v2/device#List-Data-Streams>`_ endpoint. :return: List of data streams associated with this device as :class:`.Stream` objects :rtype: `list <https://docs.python.org/2/library/functions.html#list>`_ :raises: :class:`~requests.exceptions.HTTPError` if an error occurs when sending the HTTP request """ return Stream.list(self.api, self)
def stream(self, name): """ Method for `View Data Stream <https://m2x.att.com/developer/documentation/v2/device#View-Data-Stream>`_ endpoint. :param name: The name of the Stream being retrieved :return: The matching Stream :rtype: Stream :raises: :class:`~requests.exceptions.HTTPError` if an error occurs when sending the HTTP request """ return Stream.get(self.api, self, name)
def update_stream(self, name, **params): """ Method for `Create/Update Data Stream <https://m2x.att.com/developer/documentation/v2/device#Create-Update-Data-Stream>`_ endpoint. :param name: Name of the stream to be updated :param params: Query parameters passed as keyword arguments. View M2X API Docs for listing of available parameters. :return: The Stream being updated :rtype: Stream :raises: :class:`~requests.exceptions.HTTPError` if an error occurs when sending the HTTP request """ return Stream.item_update(self.api, self, name, **params)
def update_stream(self, name, **params): return Stream.item_update(self.api, self, name, **params)
def create_stream(self, name, **params): return Stream.create(self.api, self, name, **params)
def stream(self, name): return Stream.get(self.api, self, name)
def streams(self): return Stream.list(self.api, self)