예제 #1
0
파일: api.py 프로젝트: mfreed420/m2x-python
    def collections(self, **params):
        """ `List Collections <https://m2x.att.com/developer/documentation/v2/collections#List-collections>`_

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

        :return: List of :class:`.Collection` 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 Collection.list(self, **params)
예제 #2
0
파일: api.py 프로젝트: mfreed420/m2x-python
    def create_collection(self, **params):
        """ Method for `Create Collection <https://m2x.att.com/developer/documentation/v2/collections#Create-Collection>`_ endpoint.

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

        :return: The newly created Collection
        :rtype: Collection

        :raises: :class:`~requests.exceptions.HTTPError` if an error occurs when sending the HTTP request
        """
        return Collection.create(self, **params)
예제 #3
0
파일: api.py 프로젝트: mfreed420/m2x-python
    def collection(self, id):
        """ Method for `View Collection Details <https://m2x.att.com/developer/documentation/v2/collections#View-Collection-Details>`_ endpoint.

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

        :return: The matching Collection
        :rtype: Collection

        :raises: :class:`~requests.exceptions.HTTPError` if an error occurs when sending the HTTP request
        """
        return Collection.get(self, id)
예제 #4
0
 def collections(self, **params):
     return Collection.list(self, **params)
예제 #5
0
 def create_collection(self, **params):
     return Collection.create(self, **params)
예제 #6
0
 def collection(self, id):
     return Collection.get(self, id)