(self, user, device, since, until)
return (add_urls, rem_urls, until_)
Returns subscription changes for the given device
Returns subscription changes for the given device
Returns subscription changes for the given device
def get_changes(self, user, device, since, until):
        """Returns subscription changes for the given device"""
        history = get_subscription_history(user, device, since, until)
        logger.info("Subscription History: {num}".format(num=len(history)))

        add, rem = subscription_diff(history)
        logger.info(
            "Subscription Diff: +{num_add}/-{num_remove}".format(
                num_add=len(add), num_remove=len(rem)
            )
        )

        until_ = get_timestamp(until)

        # TODO: we'd need to get the ref_urls here somehow
        add_urls = [p.url for p in add]
        rem_urls = [p.url for p in rem]
        return (add_urls, rem_urls, until_)
def get_changes ( self , user , device , since , until ) : history = get_subscription_history ( user , device , since , until ) logger . info ( "Subscription History: {num}" . format ( num = len ( history ) ) ) add , rem = subscription_diff ( history ) logger . info ( "Subscription Diff: +{num_add}/-{num_remove}" . format ( num_add = len ( add ) , num_remove = len ( rem ) ) ) until_ = get_timestamp ( until ) # TODO: we'd need to get the ref_urls here somehow add_urls = [ p . url for p in add ] rem_urls = [ p . url for p in rem ] return ( add_urls , rem_urls , until_ )