(self, request, version, username, device_uid)
return JsonResponse({"add": add, "remove": rem, "timestamp": until})
Client retrieves subscription updates
Client retrieves subscription updates
Client retrieves subscription updates
def get(self, request, version, username, device_uid):
        """Client retrieves subscription updates"""
        now = datetime.utcnow()
        user = request.user
        device = get_object_or_404(Client, user=user, uid=device_uid)
        since = self.get_since(request)
        add, rem, until = self.get_changes(user, device, since, now)
        return JsonResponse({"add": add, "remove": rem, "timestamp": until})
def get ( self , request , version , username , device_uid ) : now = datetime . utcnow ( ) user = request . user device = get_object_or_404 ( Client , user = user , uid = device_uid ) since = self . get_since ( request ) add , rem , until = self . get_changes ( user , device , since , now ) return JsonResponse ( { "add" : add , "remove" : rem , "timestamp" : until } )