retrieveTokens method
Retrieve all Recall tokens associated with the PGS Player principal encoded in the provided recall session id.
The API is only available for users that have active PGS Player profile.
Request parameters:
sessionId
- Required. Opaque server-generated string that encodes all
the necessary information to identify the PGS player / Google user and
application.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a RetrievePlayerTokensResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<RetrievePlayerTokensResponse> retrieveTokens(
core.String sessionId, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ =
'games/v1/recall/tokens/' + commons.escapeVariable('$sessionId');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return RetrievePlayerTokensResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}