putBuyXp method

Future<Either<ApiError, Profile>> putBuyXp(
  1. {required int xpAmount,
  2. required int xpPrice}
)

Implementation

Future<Either<ApiError, Profile>> putBuyXp({
  required int xpAmount,
  required int xpPrice,
}) {
  cache.get<Profile>("profile").markAsShouldReload();
  return put(
      "$_routePrefix/xp",
      (json) => Profile.fromJson(json),
      queryParameters: {
        "XpAmount": xpAmount.toString(),
        "XpPrice": xpPrice.toString(),
      },
    );
}