def add_apns_device_token(request: HttpRequest, user_profile: UserProfile, token: str=REQ(), appid: str=REQ(default=settings.ZULIP_IOS_APP_ID), ) -> HttpResponse: validate_token(token, PushDeviceToken.APNS) add_push_device_token(user_profile, token, PushDeviceToken.APNS, ios_app_id=appid) return json_success()
def add_apns_device_token(request: HttpRequest, user_profile: UserProfile, token: bytes=REQ(), appid: str=REQ(default=settings.ZULIP_IOS_APP_ID) ) -> HttpResponse: validate_token(token, PushDeviceToken.APNS) add_push_device_token(user_profile, token, PushDeviceToken.APNS, ios_app_id=appid) return json_success()
def add_apns_device_token(request, user_profile, token=REQ(), appid=REQ(default=settings.ZULIP_IOS_APP_ID)): # type: (HttpRequest, UserProfile, bytes, str) -> HttpResponse validate_token(token, PushDeviceToken.APNS) add_push_device_token(user_profile, token, PushDeviceToken.APNS, ios_app_id=appid) return json_success()
def add_android_reg_id(request, user_profile, token=REQ()): # type: (HttpRequest, UserProfile, str) -> HttpResponse validate_token(token) add_push_device_token(user_profile, token, PushDeviceToken.GCM) return json_success()
def add_apns_device_token(request, user_profile, token=REQ(), appid=REQ(default=settings.ZULIP_IOS_APP_ID)): # type: (HttpRequest, UserProfile, str, str) -> HttpResponse validate_token(token) add_push_device_token(user_profile, token, PushDeviceToken.APNS, ios_app_id=appid) return json_success()
def add_android_reg_id(request, user_profile, token=REQ()): # type: (HttpRequest, UserProfile, bytes) -> HttpResponse validate_token(token, PushDeviceToken.GCM) add_push_device_token(user_profile, token, PushDeviceToken.GCM) return json_success()
def add_android_reg_id( request: HttpRequest, user_profile: UserProfile, token: bytes = REQ()) -> HttpResponse: validate_token(token, PushDeviceToken.GCM) add_push_device_token(user_profile, token, PushDeviceToken.GCM) return json_success()
def add_android_reg_id(request: HttpRequest, user_profile: UserProfile, token: bytes=REQ()) -> HttpResponse: validate_token(token, PushDeviceToken.GCM) add_push_device_token(user_profile, token, PushDeviceToken.GCM) return json_success()