Class: RubyHackernews::UserInfoService
- Inherits:
-
Object
- Object
- RubyHackernews::UserInfoService
- Includes:
- MechanizeContext
- Defined in:
- lib/ruby-hackernews/services/user_info_service.rb
Instance Method Summary collapse
-
#comments(username, pages = 1) ⇒ Object
This doesn’t work, need a new commentService to handle the user comment page.
- #saved(username, pages = 1) ⇒ Object
- #submissions(username, pages = 1) ⇒ Object
Methods included from MechanizeContext
#[], #agent, agent=, #authenticated?, #require_authentication
Instance Method Details
#comments(username, pages = 1) ⇒ Object
This doesn’t work, need a new commentService to handle the user comment page
18 19 20 21 |
# File 'lib/ruby-hackernews/services/user_info_service.rb', line 18 def comments(username, pages = 1) page_url = ConfigurationService.base_url + 'threads?id=' + username return CommentService.new.get_new_comments(pages,page_url) end |
#saved(username, pages = 1) ⇒ Object
11 12 13 14 15 |
# File 'lib/ruby-hackernews/services/user_info_service.rb', line 11 def saved(username, pages = 1) require_authentication page_url = ConfigurationService.base_url + 'saved?id=' + username return EntryService.new.get_entries(pages, page_url) end |
#submissions(username, pages = 1) ⇒ Object
6 7 8 9 |
# File 'lib/ruby-hackernews/services/user_info_service.rb', line 6 def submissions(username, pages = 1) page_url = ConfigurationService.base_url + 'submitted?id=' + username return EntryService.new.get_entries(pages, page_url) end |