Beispiel #1
0
 def delete(self, _=None):
     """
     Overwrites base class delete. Actions cannot be deleted on the server.
     :param _: Unused client parameter.
     :raise: fetchcore.exceptions.UnsupportedOperation
     """
     raise UnsupportedOperation("Actions cannot be deleted on the server.")
Beispiel #2
0
    def list(cls, client=None, page=None, offset=None, amount=None):
        """
        Overwrites base class list. Singleton resources do not need list because you only have one resource.

        :raise fetchcore.exceptions.UnsupportedOperation:
        """
        raise UnsupportedOperation("Singleton resources cannot be listed.")
    def delete(self, client=None):
        """Overwrites base class save. Response template cannot be deleted on the server.

        :param client: The HTTP client that should be used.
        :raise: fetchcore.exceptions.UnsupportedOperation
        """
        raise UnsupportedOperation('Deleting responses is unsupported by Fetchcore.')
Beispiel #4
0
    def delete(self, _=None):
        """
        Overwrites base class delete. Live annotations are immutable and cannot be deleted on the server.

        :param _: Unused client parameter.
        :raise fetchcore.exceptions.UnsupportedOperation:
        """
        raise UnsupportedOperation("Annotations are immutable and cannot be deleted on the server.")
Beispiel #5
0
    def list(cls, client=None, page=None, offset=None, amount=None):
        """Overwrites base class list. You can get a list of all actions, but not an action with a specific action
        definition.

        :raise fetchcore.exceptions.UnsupportedOperation:
        """
        raise UnsupportedOperation(
            "Actions must be listed by using the Action resource. List method is unsupported for %s."
            % type(cls).__name__)
Beispiel #6
0
    def update(self, _=None):
        """
        Overwrites base class update. Logs are immutable and cannot be updated on the server.

        :param _: Unused client parameter.
        :raise: fetchcore.exceptions.UnsupportedOperation
        """
        raise UnsupportedOperation(
            "Logs are immutable and cannot be updated on the server.")
Beispiel #7
0
    def list(cls, client=None, page=None, offset=None, amount=None):
        """Overwrites base class list. Survey state cannot be listed on the server.

        :param client: The client that should be used (if None, the global fetchcore client is used).
        :param page: The optional page to load.
        :param offset: The first n elements to skip when loading.
        :param amount: The number of elements to load (set to any negative integer to try to load all of them).
        :raise: fetchcore.exceptions.UnsupportedOperation
        """
        raise UnsupportedOperation('Listing survey states is unsupported by Fetchcore.')