Class: Valanga::Client
- Inherits:
-
Object
- Object
- Valanga::Client
- Includes:
- MusicSearch
- Defined in:
- lib/valanga/client.rb
Constant Summary collapse
- LOGIN_PAGE =
"https://p.eagate.573.jp/gate/p/login.html"
Constants included from MusicSearch
Instance Attribute Summary collapse
-
#music_ids ⇒ Object
Returns the value of attribute music_ids.
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Instance Method Summary collapse
-
#initialize(username = nil, password = nil) ⇒ Client
constructor
A new instance of Client.
Methods included from MusicSearch
#list_musics, #music_image_url, #musics_at, #search
Constructor Details
#initialize(username = nil, password = nil) ⇒ Client
Returns a new instance of Client.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/valanga/client.rb', line 13 def initialize(username = nil, password = nil) .register_driver :poltergeist do |app| ::Poltergeist::Driver.new(app, js_errors: false) end @session = ::Session.new(:poltergeist) @music_ids = {} login!(username, password) end |
Instance Attribute Details
#music_ids ⇒ Object
Returns the value of attribute music_ids.
11 12 13 |
# File 'lib/valanga/client.rb', line 11 def music_ids @music_ids end |
#session ⇒ Object (readonly)
Returns the value of attribute session.
10 11 12 |
# File 'lib/valanga/client.rb', line 10 def session @session end |