appBskyAgeassuranceGetState function

Future<XRPCResponse<AgeassuranceGetStateOutput>> appBskyAgeassuranceGetState({
  1. required String countryCode,
  2. String? regionCode,
  3. required ServiceContext $ctx,
  4. String? $service,
  5. Map<String, String>? $headers,
  6. Map<String, String>? $unknown,
})

Returns server-computed Age Assurance state, if available, and any additional metadata needed to compute Age Assurance state client-side.

Implementation

Future<XRPCResponse<AgeassuranceGetStateOutput>> appBskyAgeassuranceGetState({
  required String countryCode,
  String? regionCode,
  required ServiceContext $ctx,
  String? $service,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.get(
  ns.appBskyAgeassuranceGetState,
  service: $service,
  headers: $headers,
  parameters: {
    ...?$unknown,
    'countryCode': countryCode,
    if (regionCode != null) 'regionCode': regionCode,
  },
  to: const AgeassuranceGetStateOutputConverter().fromJson,
);