getGeHistoryGrandexchangeHistoryCodeGetWithHttpInfo method

Future<Response> getGeHistoryGrandexchangeHistoryCodeGetWithHttpInfo(
  1. String code, {
  2. String? account,
  3. int? page,
  4. int? size,
})

Get Ge History

Fetch the transaction history of the item for the last 7 days (buy and sell orders).

Note: This method returns the HTTP Response.

Parameters:

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

  • String account: Account involved in the transaction (matches either seller or buyer).

  • int page: Page number

  • int size: Page size

Implementation

Future<Response> getGeHistoryGrandexchangeHistoryCodeGetWithHttpInfo(
  String code, {
  String? account,
  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 (account != null) {
    queryParams.addAll(_queryParams('', 'account', account));
  }
  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,
  );
}