示例#1
0
    def keys(self):
        """ Lists Keys associated with this device via the
            `List Keys <https://m2x.att.com/developer/documentation/v2/keys#List-Keys>`_ endpoint.

        :return: List of API keys associated with this device as :class:`.Key` 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 Key.list(self.api, device=self.id)
示例#2
0
    def keys(self):
        """ Lists Keys associated with this device via the
            `List Keys <https://m2x.att.com/developer/documentation/v2/keys#List-Keys>`_ endpoint.

        :return: List of API keys associated with this device as :class:`.Key` 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 Key.list(self.api, device=self.id)
示例#3
0
    def keys(self, **params):
        """ Method for `List Keys <https://m2x.att.com/developer/documentation/v2/keys#List-Keys>`_ endpoint.

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

        :return: List of :class:`.Key` 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 Key.list(self, **params)
示例#4
0
    def create_key(self, **params):
        """ Method for `Create Key <https://m2x.att.com/developer/documentation/v2/keys#Create-Key>`_ endpoint.

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

        :return: The newly created Key
        :rtype: Key

        :raises: :class:`~requests.exceptions.HTTPError` if an error occurs when sending the HTTP request
        """
        return Key.create(self, **params)
示例#5
0
    def key(self, key):
        """ Method for `View Key Details <https://m2x.att.com/developer/documentation/v2/keys#View-Key-Details>`_ endpoint.

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

        :return: The matching Key
        :rtype: Key

        :raises: :class:`~requests.exceptions.HTTPError` if an error occurs when sending the HTTP request
        """
        return Key.get(self, key)
示例#6
0
 def create_key(self, **params):
     return Key.create(self.api, device=self.id, **params)
示例#7
0
 def keys(self):
     return Key.list(self.api, device=self.id)
示例#8
0
 def keys(self, **params):
     return Key.list(self, **params)
示例#9
0
 def create_key(self, **params):
     return Key.create(self, **params)
示例#10
0
 def key(self, key):
     return Key.get(self, key)
示例#11
0
 def keys(self, **params):
     return Key.list(self, **params)
示例#12
0
 def create_key(self, **params):
     return Key.create(self, **params)
示例#13
0
 def key(self, key):
     return Key.get(self, key)