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)
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)
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)
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)
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)
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)
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)