Beispiel #1
0
    def remove_where(self, **params):
        """Deletes the registered devices identified by the given parameters.

        :Parameters:
        - `**params`: the parameters that identify the devices to remove
        """
        path = '/push/deviceRegistrations' + format_params(params)
        return self.ably.http.delete(path)
Beispiel #2
0
    def remove_where(self, **params):
        """Deletes the subscriptions identified by the given parameters.

        :Parameters:
        - `**params`: the parameters that identify the subscriptions to remove
        """
        path = '/push/channelSubscriptions' + format_params(**params)
        return self.ably.http.delete(path)
Beispiel #3
0
    def remove_where(self, **params):
        """Deletes the subscriptions identified by the given parameters.

        :Parameters:
        - `**params`: the parameters that identify the subscriptions to remove
        """
        path = '/push/channelSubscriptions' + format_params(**params)
        return self.ably.http.delete(path)
Beispiel #4
0
    def remove_where(self, **params):
        """Deletes the registered devices identified by the given parameters.

        :Parameters:
        - `**params`: the parameters that identify the devices to remove
        """
        path = '/push/deviceRegistrations' + format_params(params)
        return self.ably.http.delete(path)
Beispiel #5
0
    def history(self, direction=None, limit=None, start=None, end=None, timeout=None):
        """Returns the history for this channel"""
        params = format_params({}, direction=direction, start=start, end=end, limit=limit)
        path = self.__base_path + 'messages' + params

        message_handler = make_message_response_handler(self.__cipher)
        return PaginatedResult.paginated_query(
            self.ably.http, url=path, response_processor=message_handler)
Beispiel #6
0
    def list(self, **params):
        """Returns a PaginatedResult object with the list of DeviceDetails
        objects, filtered by the given parameters.

        :Parameters:
        - `**params`: the parameters used to filter the list
        """
        path = '/push/deviceRegistrations' + format_params(params)
        return PaginatedResult.paginated_query(
            self.ably.http, url=path,
            response_processor=device_details_response_processor)
Beispiel #7
0
    def list_channels(self, **params):
        """Returns a PaginatedResult object with the list of
        PushChannelSubscription objects, filtered by the given parameters.

        :Parameters:
        - `**params`: the parameters used to filter the list
        """
        path = '/push/channels' + format_params(params)
        return PaginatedResult.paginated_query(
            self.ably.http, url=path,
            response_processor=channels_response_processor)
Beispiel #8
0
    def list(self, **params):
        """Returns a PaginatedResult object with the list of DeviceDetails
        objects, filtered by the given parameters.

        :Parameters:
        - `**params`: the parameters used to filter the list
        """
        path = '/push/deviceRegistrations' + format_params(params)
        return PaginatedResult.paginated_query(
            self.ably.http, url=path,
            response_processor=device_details_response_processor)
Beispiel #9
0
    def list_channels(self, **params):
        """Returns a PaginatedResult object with the list of
        PushChannelSubscription objects, filtered by the given parameters.

        :Parameters:
        - `**params`: the parameters used to filter the list
        """
        path = '/push/channels' + format_params(params)
        return PaginatedResult.paginated_query(
            self.ably.http, url=path,
            response_processor=channels_response_processor)
Beispiel #10
0
    async def history(self, direction=None, limit=None, start=None, end=None):
        """Returns the history for this channel"""
        params = format_params({},
                               direction=direction,
                               start=start,
                               end=end,
                               limit=limit)
        path = self.__base_path + 'messages' + params

        message_handler = make_message_response_handler(self.__cipher)
        return await PaginatedResult.paginated_query(
            self.ably.http, url=path, response_processor=message_handler)
Beispiel #11
0
 async def stats(self,
                 direction=None,
                 start=None,
                 end=None,
                 params=None,
                 limit=None,
                 paginated=None,
                 unit=None,
                 timeout=None):
     """Returns the stats for this application"""
     params = format_params(params,
                            direction=direction,
                            start=start,
                            end=end,
                            limit=limit,
                            unit=unit)
     url = '/stats' + params
     return await PaginatedResult.paginated_query(
         self.http, url=url, response_processor=stats_response_processor)