getUUIDMetadata method
Returns the specified uuidMetadata, optionally including uuidMetadata's custom data object.
To include custom
property fields in response, set includeCustomFields
to true
Omit this parameter if you don't want to retrieve additional metadata.
To omit status
field from metadata, set includeStatus
to false
Default is true
.
To omit type
field from metadata, set includeType
to false
Default is true
.
uuid
is Unique identifier of an end-user. It may contain up to 92 UTF-8 byte sequences.
Prohibited characters are ,, /, , *, :, channel, non-printable ASCII control characters, and Unicode zero.
- If
uuid
not provided then it picksuuid
fromkeyset
or PubNub instance'suuid
- If no
uuid
is set in PubNub instance default keyset,keyset
does not hold uuid anduuid
not provided in argument then it throws InvariantException
Implementation
Future<GetUuidMetadataResult> getUUIDMetadata({
String? uuid,
Keyset? keyset,
String? using,
bool? includeCustomFields,
bool includeStatus = true,
bool includeType = true,
}) async {
keyset ??= _core.keysets[using];
var include = <String>{};
if (includeCustomFields != null && includeCustomFields) {
include.add('custom');
}
if (includeStatus) {
include.add('status');
}
if (includeType) {
include.add('type');
}
var params = GetUuidMetadataParams(keyset, uuid: uuid, include: include);
return defaultFlow<GetUuidMetadataParams, GetUuidMetadataResult>(
keyset: keyset,
core: _core,
params: params,
serialize: (object, [_]) => GetUuidMetadataResult.fromJson(object));
}