Class: CompanionApi::Resources::Market
- Inherits:
-
Object
- Object
- CompanionApi::Resources::Market
- Defined in:
- lib/companion_api/resources/market.rb
Instance Attribute Summary collapse
-
#profile ⇒ Object
Returns the value of attribute profile.
Instance Method Summary collapse
-
#initialize(profile) ⇒ Market
constructor
A new instance of Market.
- #item_market_listings(item_id, hq: false) ⇒ Object
- #market_listings_by_category(category_id) ⇒ Object
- #transaction_history(catalog_id) ⇒ Object
Constructor Details
#initialize(profile) ⇒ Market
Returns a new instance of Market.
6 7 8 |
# File 'lib/companion_api/resources/market.rb', line 6 def initialize(profile) @profile = profile end |
Instance Attribute Details
#profile ⇒ Object
Returns the value of attribute profile.
4 5 6 |
# File 'lib/companion_api/resources/market.rb', line 4 def profile @profile end |
Instance Method Details
#item_market_listings(item_id, hq: false) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/companion_api/resources/market.rb', line 10 def item_market_listings(item_id, hq: false) endpoint = "/market/items/catalog/#{item_id}" endpoint += "/hq" if hq request_result(endpoint) end |
#market_listings_by_category(category_id) ⇒ Object
17 18 19 |
# File 'lib/companion_api/resources/market.rb', line 17 def market_listings_by_category(category_id) request_result("/market/items/category/#{category_id}") end |
#transaction_history(catalog_id) ⇒ Object
21 22 23 |
# File 'lib/companion_api/resources/market.rb', line 21 def transaction_history(catalog_id) request_result("/market/items/history/catalog/#{catalog_id}") end |