class Itch::Client
The primary client interface
The top level client delegates to child modules for specific app areas like game and purchases pages
Public Class Methods
new(username: nil, password: nil, cookie_path: nil)
click to toggle source
# File lib/itch/client.rb, line 23 def initialize(username: nil, password: nil, cookie_path: nil) @agent = Mechanize.new @auth = Auth.new(@agent, username: username, password: password, cookie_path: cookie_path) @agent.cookie_jar.load(cookie_path) if cookie_path && File.readable?(cookie_path) end
Public Instance Methods
game(id = nil, name: nil)
click to toggle source
# File lib/itch/client.rb, line 30 def game(id = nil, name: nil) Game.new(@agent, game_map, id, name: name) end
game_map()
click to toggle source
# File lib/itch/client.rb, line 38 def game_map @game_map ||= GameMap.new(@agent) end
purchases()
click to toggle source
# File lib/itch/client.rb, line 34 def purchases @purchases ||= Purchases.new(@agent) end