示例#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)
示例#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)
示例#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)
示例#4
0
 def commands(self, **params):
     return Command.list(self, **params)
示例#5
0
 def send_command(self, **params):
     return Command.create(self, **params)
示例#6
0
 def command(self, id):
     return Command.get(self, id)