Class: Trakt::Friends

Inherits:
Object
  • Object
show all
Includes:
Connection
Defined in:
lib/trakt/friends.rb

Instance Attribute Summary

Attributes included from Connection

#trakt

Instance Method Summary collapse

Methods included from Connection

#initialize, #require_settings

Instance Method Details

#add(username) ⇒ Object



4
5
6
7
# File 'lib/trakt/friends.rb', line 4

def add(username)
  require_settings %w|username password apikey|
  post "friends/#{__method__}/", 'friend' => username
end

#allObject



8
9
10
11
# File 'lib/trakt/friends.rb', line 8

def all
  require_settings %w|username password apikey|
  post 'friends/all/'
end

#approve(username) ⇒ Object



12
13
14
15
# File 'lib/trakt/friends.rb', line 12

def approve(username)
  require_settings %w|username password apikey|
  post "friends/#{__method__}/", 'friend' => username
end

#delete(username) ⇒ Object



16
17
18
19
# File 'lib/trakt/friends.rb', line 16

def delete(username)
  require_settings %w|username password apikey|
  post "friends/#{__method__}/", 'friend' => username
end

#denyObject



20
21
22
23
# File 'lib/trakt/friends.rb', line 20

def deny
  require_settings %w|username password apikey|
  post "friends/#{__method__}/", 'friend' => username
end

#requests(username) ⇒ Object



24
25
26
27
# File 'lib/trakt/friends.rb', line 24

def requests(username)
  require_settings %w|username password apikey|
  post 'friends/requests/'
end