insertSocketPlugFree static method
Future<DestinyItemChangeResponseResponse>
insertSocketPlugFree(
- HttpClient client,
- DestinyInsertPlugsFreeActionRequest body
Insert a 'free' plug into an item's socket. This does not require 'Advanced Write Action' authorization and is available to 3rd-party apps, but will only work on 'free and reversible' socket actions (Perks, Armor Mods, Shaders, Ornaments, etc.). You must have a valid Destiny Account, and the character must either be in a social space, in orbit, or offline.
Implementation
static Future<DestinyItemChangeResponseResponse> insertSocketPlugFree (
HttpClient client,
DestinyInsertPlugsFreeActionRequest body
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final HttpClientConfig config = HttpClientConfig('POST', '/Destiny2/Actions/Items/InsertSocketPlugFree/', params);
config.body = await body.asyncToJson();
config.bodyContentType = 'application/json';
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return DestinyItemChangeResponseResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}