Class: Traktr::User::Calendar

Inherits:
Endpoint
  • Object
show all
Defined in:
lib/traktr/user/calendar.rb

Instance Method Summary collapse

Methods inherited from Endpoint

#initialize

Constructor Details

This class inherits a constructor from Traktr::Endpoint

Instance Method Details

#shows(username = @client.username, date = Date.today, days = 7) ⇒ Object



4
5
6
7
# File 'lib/traktr/user/calendar.rb', line 4

def shows(username = @client.username, date = Date.today, days = 7)
  date = date.class == Date ? date.strftime("%Y%m%d") : date.to_s
  parse_response self.class.get('/' + File.join('shows.json', @client.api_key, username, date, days.to_s), :basic_auth => @auth)
end