Esempio n. 1
0
    def commands(self, **params):
        """ Method for `List Sent Commands <https://m2x.att.com/developer/documentation/v2/commands#List-Sent-Commands>`_ endpoint.

        :param params: Query parameters passed as keyword arguments. View M2X API Docs for listing of available parameters.

        :return: List of :class:`.Command` 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 Command.list(self, **params)
Esempio n. 2
0
    def send_command(self, **params):
        """ Method for `Send Command <https://m2x.att.com/developer/documentation/v2/commands#Send-Command>`_ endpoint.

        :param params: Query parameters passed as keyword arguments. View M2X API Docs for listing of available parameters.

        :return: The Command that was just sent
        :rtype: Command

        :raises: :class:`~requests.exceptions.HTTPError` if an error occurs when sending the HTTP request
        """
        return Command.create(self, **params)
Esempio n. 3
0
    def command(self, id):
        """ Method for `View Command Details <https://m2x.att.com/developer/documentation/v2/commands#View-Command-Details>`_ endpoint.

        :param id: ID of the Command to retrieve
        :type id: str

        :return: The matching Command
        :rtype: Command

        :raises: :class:`~requests.exceptions.HTTPError` if an error occurs when sending the HTTP request
        """
        return Command.get(self, id)
Esempio n. 4
0
 def commands(self, **params):
     return Command.list(self, **params)
Esempio n. 5
0
 def send_command(self, **params):
     return Command.create(self, **params)
Esempio n. 6
0
 def command(self, id):
     return Command.get(self, id)