Skip to content

update getAllItemPrices #8

@waxapi

Description

@waxapi

I'm leaving this here for anyone who needed the getAllItemPrices() to allow app_id as a parameter.

      let getItemPrices = function (app_id, simple) {
        function arrayToObject(object, item) {
          object[item.market_hash_name] = item.price;
          return object;
        }

        return api.makeRequest('get_all_item_prices', {
          app_id
        }, (body) => {
          if (simple) {
            body.prices = body.prices.reduce(arrayToObject, {});
          }

          return body.prices;
        });
      }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions