whereIsForCreatorDid method Null safety
Get all WhereIs for a User
This method queries the blockchain for a List<WhereIs>
by creator
and did
. This contains a Bucket which
stores individual user data. This method is useful for retreiving a list of applications a user has authorized.
Parameters
creator
- The user's DID to query fordid
- The user's DID to query for
Implementation
Future<List<WhereIs>?> whereIsForCreatorDid(String creator, String did) async {
try {
final response = await httpClient.get<QueryWhereIsByCreatorResponse>('/bucket/whereis/$creator/$did', contentType: "application/json");
if (!response.isOk || response.body == null) {
return null;
}
return response.body?.whereIs;
} catch (e) {
Log.warn("Failed to call query using REST API on $baseUrl/$query");
}
return null;
}