getPlatformFriendList static method
Future<PlatformFriendResponseResponse>
getPlatformFriendList(
- HttpClient client,
- PlatformFriendType friendPlatform,
- String page
Gets the platform friend of the requested type, with additional information if they have Bungie accounts. Must have a recent login session with said platform.
Implementation
static Future<PlatformFriendResponseResponse> getPlatformFriendList (
HttpClient client,
PlatformFriendType friendPlatform,
String page,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final String _friendPlatform = '${friendPlatform.value}';
final String _page = '$page';
final HttpClientConfig config = HttpClientConfig('GET', '/Social/PlatformFriends/$_friendPlatform/$_page/', params);
config.bodyContentType = null;
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return PlatformFriendResponseResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}