class Traktr::User

Public Instance Methods

calendar() click to toggle source
# File lib/traktr/user.rb, line 28
def calendar
  @calendar ||= Traktr::User::Calendar.new(@client)
end
lastactivity(user = @client.username) click to toggle source
# File lib/traktr/user.rb, line 3
def lastactivity(user = @client.username)
  parse_response self.class.get("/" + File.join("lastactivity.json", @client.api_key, user), :basic_auth => @auth)
end
library() click to toggle source
# File lib/traktr/user.rb, line 32
def library
  @library ||= Traktr::User::Library.new(@client)
end
list(slug, user = @client.username) click to toggle source
# File lib/traktr/user.rb, line 7
def list(slug, user = @client.username)
  parse_response self.class.get("/" + File.join("list.json", @client.api_key, user, slug), :basic_auth => @auth)
end
lists(user = @client.username) click to toggle source
# File lib/traktr/user.rb, line 11
def lists(user = @client.username)
  parse_response self.class.get("/" + File.join("lists.json", @client.api_key, user), :basic_auth => @auth)
end
network() click to toggle source
# File lib/traktr/user.rb, line 36
def network
  @network ||= Traktr::User::Network.new(@client)
end
profile(user = @client.username) click to toggle source
# File lib/traktr/user.rb, line 15
def profile(user = @client.username)
  parse_response self.class.get("/" + File.join("profile.json", @client.api_key, user), :basic_auth => @auth)
end
progress() click to toggle source
# File lib/traktr/user.rb, line 40
def progress
  @progress ||= Traktr::User::Progress.new(@client)
end
ratings() click to toggle source
# File lib/traktr/user.rb, line 44
def ratings
  @ratings ||= Traktr::User::Ratings.new(@client)
end
watching(user = @client.username) click to toggle source
# File lib/traktr/user.rb, line 19
def watching(user = @client.username)
  #
  # TODO : When the user is protected or not currently watching anything, this
  #        returns an empty array. However, Trakt's documentation makes it seem
  #        like an empty object will be returned
  #
  parse_response self.class.get("/" + File.join("watching.json", @client.api_key, user), :basic_auth => @auth)
end
watchlist() click to toggle source
# File lib/traktr/user.rb, line 48
def watchlist
  @watchlist ||= Traktr::User::Watchlist.new(@client)
end