GameInventory class is not defined

48 views
Skip to first unread message

Олег Кивилёв

unread,
Sep 3, 2015, 12:21:09 PM9/3/15
to Steam Condenser
So I'm trying out steam-condenser, to load players inventory. 

class PagesController < ApplicationController

def index
#295110
inventory = GameInventory.new(730, 76561197969907698)
raise inventory.items.inspect
end

end

Unfortunately I get the following exception:
uninitialized constant PagesController::GameInventory

http://www.rubydoc.info/gems/steam-condenser/GameInventory - according to this doc GameInventory is defined at top-namespace, so there shouldn't be a problem. 
To avoid questions regarding if I included this gem in my gemfile..

gem 'omniauth-steam'
gem 'devise'
gem 'bootstrap-sass'
gem 'steam-condenser', '~> 1.3.11'

I can use SteamId class without any problem, so what I'm doing wrong with GameInventory?

Sebastian Staudt

unread,
Sep 3, 2015, 12:52:21 PM9/3/15
to Steam Condenser
Hi.

You will have to require it explicitly:

    require 'steam/community/steam_id'


Best regards,
    Sebastian

--
You received this message because you are subscribed to the Google Groups "Steam Condenser" group.
To unsubscribe from this group and stop receiving emails from it, send an email to steam-condens...@googlegroups.com.
To post to this group, send email to steam-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/steam-condenser/f6f79143-245b-4a55-8f33-169defbee895%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Олег Кивилёв

unread,
Sep 3, 2015, 6:49:14 PM9/3/15
to Steam Condenser
Thanks for quick response, 

require 'steam/community/game_inventory'

did the trick! 

But now I faced a different problem, I can't find way to provide my steam WebApi key. It throws 403 if I dont provide it.

четверг, 3 сентября 2015 г., 18:21:09 UTC+2 пользователь Олег Кивилёв написал:

Sebastian Staudt

unread,
Sep 4, 2015, 1:16:30 AM9/4/15
to Steam Condenser
Looks like a Rails app, so setting it somewhere in your config/environment.rb (or in config/environments/production.rb etc.) should do it.

    WebApi.key = '...'

--
You received this message because you are subscribed to the Google Groups "Steam Condenser" group.
To unsubscribe from this group and stop receiving emails from it, send an email to steam-condens...@googlegroups.com.
To post to this group, send email to steam-c...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages