mixcoatl/admin/api_key.py
def all(cls, keys_only=False, endpoint=None, **kwargs):
        """Get all api keys

        .. note::

            The keys used to make the request determine results visibility

        :param keys_only: Only return `access_key` instead of `ApiKey` objects
        :type keys_only: bool.
        :param detail: The level of detail to return - `basic` or `extended`
        :type detail: str.
        :param account_id: Display all system keys belonging to `account_id`
        :type account_id: int.
        :param user_id: Display all keys belonging to `user_id`
        :type user_id: int.
        :returns: `list` - of :class:`ApiKey` or :attr:`access_key`
        """

        if 'access_key' in kwargs:
            r = Resource(cls.PATH + "/" + kwargs['access_key'], endpoint=endpoint)
            params = {}
        else:
            r = Resource(cls.PATH, endpoint=endpoint)

            if 'detail' in kwargs:
                r.request_details = kwargs['detail']
            else:
                r.request_details = 'basic'

            if 'account_id' in kwargs:
                params = {'accountId': kwargs['account_id']}
            elif 'user_id' in kwargs:
                params = {'userId': kwargs['user_id']}
            else:
                params = {}

        x = r.get(params=params)
        if r.last_error is None:
            if keys_only is True:
                return [i[camelize(cls.PRIMARY_KEY)]
                        for i in x[cls.COLLECTION_NAME]]
            else:
                return [type(cls.__name__, (object,), i)
                        for i in uncamel_keys(x)[uncamel(cls.COLLECTION_NAME)]]
        else:
            raise ApiKeyException(r.last_error)
Get all api keys

        .. note::

            The keys used to make the request determine results visibility

        :param keys_only: Only return `access_key` instead of `ApiKey` objects
        :type keys_only: bool.
        :param detail: The level of detail to return - `basic` or `extended`
        :type detail: str.
        :param account_id: Display all system keys belonging to `account_id`
        :type account_id: int.
        :param user_id: Display all keys belonging to `user_id`
        :type user_id: int.
        :returns: `list` - of :class:`ApiKey` or :attr:`access_key`
        
Get all api keys
note:.

The keys used to make the request determine results visibility
Get all api keys note : . The keys used to make the request determine results visibility
def all(cls, keys_only=False, endpoint=None, **kwargs):
        if 'access_key' in kwargs:
            r = Resource(cls.PATH + "/" + kwargs['access_key'], endpoint=endpoint)
            params = {}
        else:
            r = Resource(cls.PATH, endpoint=endpoint)
            if 'detail' in kwargs:
                r.request_details = kwargs['detail']
            else:
                r.request_details = 'basic'
            if 'account_id' in kwargs:
                params = {'accountId': kwargs['account_id']}
            elif 'user_id' in kwargs:
                params = {'userId': kwargs['user_id']}
            else:
                params = {}
        x = r.get(params=params)
        if r.last_error is None:
            if keys_only is True:
                return [i[camelize(cls.PRIMARY_KEY)]
                        for i in x[cls.COLLECTION_NAME]]
            else:
                return [type(cls.__name__, (object,), i)
                        for i in uncamel_keys(x)[uncamel(cls.COLLECTION_NAME)]]
        else:
            raise ApiKeyException(r.last_error)
def all ( cls , keys_only = False , endpoint = None , ** kwargs ) : if 'access_key' in kwargs : r = Resource ( cls . PATH + "/" + kwargs [ 'access_key' ] , endpoint = endpoint ) params = { } else : r = Resource ( cls . PATH , endpoint = endpoint ) if 'detail' in kwargs : r . request_details = kwargs [ 'detail' ] else : r . request_details = 'basic' if 'account_id' in kwargs : params = { 'accountId' : kwargs [ 'account_id' ] } elif 'user_id' in kwargs : params = { 'userId' : kwargs [ 'user_id' ] } else : params = { } x = r . get ( params = params ) if r . last_error is None : if keys_only is True : return [ i [ camelize ( cls . PRIMARY_KEY ) ] for i in x [ cls . COLLECTION_NAME ] ] else : return [ type ( cls . __name__ , ( object , ) , i ) for i in uncamel_keys ( x ) [ uncamel ( cls . COLLECTION_NAME ) ] ] else : raise ApiKeyException ( r . last_error )
Get all api keys
.. note::
Get all api keys .. note ::
"""Get all api keys

        .. note::

            The keys used to make the request determine results visibility

        :param keys_only: Only return `access_key` instead of `ApiKey` objects
        :type keys_only: bool.
        :param detail: The level of detail to return - `basic` or `extended`
        :type detail: str.
        :param account_id: Display all system keys belonging to `account_id`
        :type account_id: int.
        :param user_id: Display all keys belonging to `user_id`
        :type user_id: int.
        :returns: `list` - of :class:`ApiKey` or :attr:`access_key`
        """
`list` - of :class:`ApiKey` or :attr:`access_key`
` list ` - of : class : ` ApiKey ` or : attr : ` access_key `
cls
keys_only
Only return `access_key` instead of `ApiKey` objects
Only return ` access_key ` instead of ` ApiKey ` objects
endpoint
detail
The level of detail to return - `basic` or `extended`
The level of detail to return - ` basic ` or ` extended `
account_id
Display all system keys belonging to `account_id`
Display all system keys belonging to ` account_id `
user_id
Display all keys belonging to `user_id`
Display all keys belonging to ` user_id `