Exemple #1
0
    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)
Exemple #2
0
    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)
Exemple #3
0
    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)
Exemple #4
0
    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)
Exemple #5
0
    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)
Exemple #6
0
    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)
Exemple #7
0
 def update_stream(self, name, **params):
     return Stream.item_update(self.api, self, name, **params)
Exemple #8
0
 def create_stream(self, name, **params):
     return Stream.create(self.api, self, name, **params)
Exemple #9
0
 def stream(self, name):
     return Stream.get(self.api, self, name)
Exemple #10
0
 def streams(self):
     return Stream.list(self.api, self)