Class: TriviaCrack::API::Client

Inherits:
Object
  • Object
show all
Includes:
Game, Login, Profile, Question, User
Defined in:
lib/triviacrack/api/client.rb

Instance Method Summary collapse

Methods included from Profile

#get_my_profile, #get_profile

Methods included from Common

#get, #post

Methods included from Question

#answer_question, #answer_questions

Methods included from User

#get_user, #get_user_id

Methods included from Login

#login

Methods included from Game

#get_game, #get_games, #start_new_game

Instance Method Details

#set_session(session_id, user_id) ⇒ Object

Public: Creates a new TriviaCrack::Session object using the given session_id and user_id and assigns that session to this TriviaCrack::API::Client.

session_id - The Trivia Crack session ID. user_id - The Trivia Crack user ID.



24
25
26
27
# File 'lib/triviacrack/api/client.rb', line 24

def set_session(session_id, user_id)
  @session = TriviaCrack::Session.new session_id: session_id,
                                      user_id: user_id
end