Class: Manga::Tools::Client
- Inherits:
-
Object
- Object
- Manga::Tools::Client
- Defined in:
- lib/manga/tools/client.rb
Overview
Client Application class
Instance Attribute Summary collapse
-
#session ⇒ Manga::Tools::Session
readonly
A session instance.
Instance Method Summary collapse
-
#follow(key, options) ⇒ Object
Follow a title for a given follow ‘key`.
-
#follow_list(options) ⇒ Object
Displays the follow list.
-
#initialize ⇒ Client
constructor
A new instance of Client.
-
#search(word, options) ⇒ Object
Search ‘word` with options.
Constructor Details
Instance Attribute Details
#session ⇒ Manga::Tools::Session (readonly)
Returns a session instance.
13 14 15 |
# File 'lib/manga/tools/client.rb', line 13 def session @session end |
Instance Method Details
#follow(key, options) ⇒ Object
Follow a title for a given follow ‘key`
30 31 32 33 34 |
# File 'lib/manga/tools/client.rb', line 30 def follow(key, ) params = { key: key } session. = adapt_to_dev_env() session.post('/follows', params) end |
#follow_list(options) ⇒ Object
Displays the follow list
38 39 40 41 |
# File 'lib/manga/tools/client.rb', line 38 def follow_list() session. = adapt_to_dev_env() session.get('/follows') end |
#search(word, options) ⇒ Object
Search ‘word` with options.
22 23 24 25 |
# File 'lib/manga/tools/client.rb', line 22 def search(word, ) session. = adapt_to_dev_env() session.get("/publications?keyword=#{CGI.escape(word)}") end |