Module: VkMusic::Utility::Authorizer
- Defined in:
- lib/vk_music/utility/authorizer.rb
Overview
Creates authorized client based of cookies file or ENV variables
Class Method Summary collapse
-
.call(login, password, cookie_path) ⇒ Mechanize
Logged in Mechanize client.
Class Method Details
.call(login, password, cookie_path) ⇒ Mechanize
Returns logged in Mechanize client.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/vk_music/utility/authorizer.rb', line 10 def call(login, password, ) agent = Mechanize.new if File.exist?() (agent., ) else login_agent(agent, login, password) end agent..save(, session: true) agent end |