appBskyNotificationRegisterPush function

Future<XRPCResponse<EmptyData>> appBskyNotificationRegisterPush({
  1. required String serviceDid,
  2. required String token,
  3. required NotificationRegisterPushPlatform platform,
  4. required String appId,
  5. bool? ageRestricted,
  6. required ServiceContext $ctx,
  7. String? $service,
  8. Map<String, String>? $headers,
  9. Map<String, String>? $unknown,
})

Register to receive push notifications, via a specified service, for the requesting account. Requires auth.

Implementation

Future<XRPCResponse<EmptyData>> appBskyNotificationRegisterPush({
  required String serviceDid,
  required String token,
  required NotificationRegisterPushPlatform platform,
  required String appId,
  bool? ageRestricted,
  required ServiceContext $ctx,
  String? $service,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.appBskyNotificationRegisterPush,
  service: $service,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    'serviceDid': serviceDid,
    'token': token,
    'platform': platform.toJson(),
    'appId': appId,
    if (ageRestricted != null) 'ageRestricted': ageRestricted,
  },
);