Class: Traktr::Activity::User
- Defined in:
- lib/traktr/activity/user.rb
Instance Method Summary collapse
- #episodes(username, title, season, episode, actions = :all, start_ts = 0, end_ts = Time.now.to_i) ⇒ Object
- #movies(username, title, actions = :all, start_ts = 0, end_ts = Time.now.to_i) ⇒ Object
- #seasons(username, title, season, actions = :all, start_ts = 0, end_ts = Time.now.to_i) ⇒ Object
- #shows(username, title, actions = :all, start_ts = 0, end_ts = Time.now.to_i) ⇒ Object
Methods inherited from Endpoint
Constructor Details
This class inherits a constructor from Traktr::Endpoint
Instance Method Details
#episodes(username, title, season, episode, actions = :all, start_ts = 0, end_ts = Time.now.to_i) ⇒ Object
4 5 6 7 |
# File 'lib/traktr/activity/user.rb', line 4 def episodes(username, title, season, episode, actions = :all, start_ts = 0, end_ts = Time.now.to_i) actions = actions.class == Array ? actions.join(",") : actions.to_s parse_response self.class.get('/' + File.join('episodes.json', @client.api_key, username, title, season.to_s, episode.to_s, actions, start_ts.to_s, end_ts.to_s)) end |
#movies(username, title, actions = :all, start_ts = 0, end_ts = Time.now.to_i) ⇒ Object
9 10 11 12 |
# File 'lib/traktr/activity/user.rb', line 9 def movies(username, title, actions = :all, start_ts = 0, end_ts = Time.now.to_i) actions = actions.class == Array ? actions.join(",") : actions.to_s parse_response self.class.get('/' + File.join('movies.json', @client.api_key, username, title, actions, start_ts.to_s, end_ts.to_s)) end |
#seasons(username, title, season, actions = :all, start_ts = 0, end_ts = Time.now.to_i) ⇒ Object
14 15 16 17 |
# File 'lib/traktr/activity/user.rb', line 14 def seasons(username, title, season, actions = :all, start_ts = 0, end_ts = Time.now.to_i) actions = actions.class == Array ? actions.join(",") : actions.to_s parse_response self.class.get('/' + File.join('seasons.json', @client.api_key, username, title, season.to_s, actions, start_ts.to_s, end_ts.to_s)) end |
#shows(username, title, actions = :all, start_ts = 0, end_ts = Time.now.to_i) ⇒ Object
19 20 21 22 |
# File 'lib/traktr/activity/user.rb', line 19 def shows(username, title, actions = :all, start_ts = 0, end_ts = Time.now.to_i) actions = actions.class == Array ? actions.join(",") : actions.to_s parse_response self.class.get('/' + File.join('shows.json', @client.api_key, username, title, actions, start_ts.to_s, end_ts.to_s)) end |