getCollectibleNodeDetails static method

Future<DestinyCollectibleNodeDetailResponseResponse> getCollectibleNodeDetails(
  1. HttpClient client,
  2. String characterId,
  3. int collectiblePresentationNodeHash,
  4. List<DestinyComponentType> components,
  5. String destinyMembershipId,
  6. BungieMembershipType membershipType,
)

Given a Presentation Node that has Collectibles as direct descendants, this will return item details about those descendants in the context of the requesting character.

Implementation

static Future<DestinyCollectibleNodeDetailResponseResponse> getCollectibleNodeDetails (
    HttpClient client,
    String characterId,
    int collectiblePresentationNodeHash,
    List<DestinyComponentType> components,
    String destinyMembershipId,
    BungieMembershipType membershipType,
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final String _characterId = '$characterId';
    final String _collectiblePresentationNodeHash = '$collectiblePresentationNodeHash';
    final String _destinyMembershipId = '$destinyMembershipId';
    final String _membershipType = '${membershipType.value}';
    params['components'] = components.map((DestinyComponentType components)=>components.value).toList();
    final HttpClientConfig config = HttpClientConfig('GET', '/Destiny2/$_membershipType/Profile/$_destinyMembershipId/Character/$_characterId/Collectibles/$_collectiblePresentationNodeHash/', params);
    config.bodyContentType = null;
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return DestinyCollectibleNodeDetailResponseResponse.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}