updateLoadoutIdentifiers static method

Future<Int32Response> updateLoadoutIdentifiers(
  1. HttpClient client,
  2. DestinyLoadoutUpdateActionRequest body
)

Update the color, icon, and name of a loadout.

Implementation

static Future<Int32Response> updateLoadoutIdentifiers (
    HttpClient client,
    DestinyLoadoutUpdateActionRequest body
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final HttpClientConfig config = HttpClientConfig('POST', '/Destiny2/Actions/Loadouts/UpdateLoadoutIdentifiers/', params);
    config.body = await body.asyncToJson();
    config.bodyContentType = 'application/json';
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return Int32Response.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}