getGeSellHistoryGrandexchangeHistoryCodeGetWithHttpInfo method

Future<Response> getGeSellHistoryGrandexchangeHistoryCodeGetWithHttpInfo(
  1. String code, {
  2. String? seller,
  3. String? buyer,
  4. int? page,
  5. int? size,
})

Get Ge Sell History

Fetch the sales history of the item for the last 7 days.

Note: This method returns the HTTP Response.

Parameters:

  • String code (required): The code of the item.

  • String seller: The seller (account name) of the item.

  • String buyer: The buyer (account name) of the item.

  • int page: Page number

  • int size: Page size

Implementation

Future<Response> getGeSellHistoryGrandexchangeHistoryCodeGetWithHttpInfo(
  String code, {
  String? seller,
  String? buyer,
  int? page,
  int? size,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/grandexchange/history/{code}'.replaceAll('{code}', code);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (seller != null) {
    queryParams.addAll(_queryParams('', 'seller', seller));
  }
  if (buyer != null) {
    queryParams.addAll(_queryParams('', 'buyer', buyer));
  }
  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (size != null) {
    queryParams.addAll(_queryParams('', 'size', size));
  }

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}