Class: Steamworks::API
- Inherits:
-
Object
- Object
- Steamworks::API
- Defined in:
- lib/steamworks/api.rb
Instance Method Summary collapse
-
#authenticate_user_ticket(ticket: nil) ⇒ Object
partner.steamgames.com/doc/webapi/ISteamUserAuth#AuthenticateUserTicket GET partner.steam-api.com/ISteamUserAuth/AuthenticateUserTicket/v1/ key: string appid: uint32 ticket: string identity: string.
-
#initialize ⇒ API
constructor
A new instance of API.
Constructor Details
#initialize ⇒ API
Returns a new instance of API.
5 6 7 8 9 10 11 12 13 |
# File 'lib/steamworks/api.rb', line 5 def initialize @partner_conn = Steamworks::Connection.new(gateway: :partner) @public_conn = Steamworks::Connection.new(gateway: :public) config = Steamworks::Configure @key = config.key @appid = config.appid @identity = config.identity end |
Instance Method Details
#authenticate_user_ticket(ticket: nil) ⇒ Object
partner.steamgames.com/doc/webapi/ISteamUserAuth#AuthenticateUserTicket GET partner.steam-api.com/ISteamUserAuth/AuthenticateUserTicket/v1/ key: string appid: uint32 ticket: string identity: string
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/steamworks/api.rb', line 21 def authenticate_user_ticket(ticket: nil) resp = @partner_conn.get("/ISteamUserAuth/AuthenticateUserTicket/v1/") do |req| req.params = { key: @key, appid: @appid, ticket: ticket, identity: @identity } end JSON.parse(resp.body) end |