Module: Pinterest::Client::User

Included in:
Pinterest::Client
Defined in:
lib/pinterest/client/user.rb

Instance Method Summary collapse

Instance Method Details

#follow_board(board_id) ⇒ Object



41
42
43
# File 'lib/pinterest/client/user.rb', line 41

def follow_board(board_id)
  post('me/following/boards', board: board_id)
end

#follow_interest(interest_id) ⇒ Object



49
50
51
# File 'lib/pinterest/client/user.rb', line 49

def follow_interest(interest_id)
  post('me/following/interests', interest: interest_id)
end

#follow_user(user) ⇒ Object



33
34
35
# File 'lib/pinterest/client/user.rb', line 33

def follow_user(user)
  post('me/following/users', user: user)
end

#get_boards(options = {}) ⇒ Object



17
18
19
# File 'lib/pinterest/client/user.rb', line 17

def get_boards(options={})
  get("me/boards", options)
end

#get_followed_boards(options = {}) ⇒ Object



21
22
23
# File 'lib/pinterest/client/user.rb', line 21

def get_followed_boards(options={})
  get("me/following/boards", options)
end

#get_followed_interests(options = {}) ⇒ Object



29
30
31
# File 'lib/pinterest/client/user.rb', line 29

def get_followed_interests(options={})
  get("me/following/interests", options)
end

#get_followed_users(options = {}) ⇒ Object



25
26
27
# File 'lib/pinterest/client/user.rb', line 25

def get_followed_users(options={})
  get("me/following/users", options)
end

#get_followers(options = {}) ⇒ Object



9
10
11
# File 'lib/pinterest/client/user.rb', line 9

def get_followers(options={})
  get("me/followers", options)
end

#get_likes(options = {}) ⇒ Object



13
14
15
# File 'lib/pinterest/client/user.rb', line 13

def get_likes(options={})
  get("me/likes", options)
end

#get_pins(options = {}) ⇒ Object



57
58
59
60
# File 'lib/pinterest/client/user.rb', line 57

def get_pins(options={})
  options[:query] ||= '*'
  get('me/search/pins', options)
end

#get_user(user, options = {}) ⇒ Object



67
68
69
# File 'lib/pinterest/client/user.rb', line 67

def get_user(user, options={})
  get("users/#{user}", options)
end

#me(options = {}) ⇒ Object



5
6
7
# File 'lib/pinterest/client/user.rb', line 5

def me(options={})
  get('me', options)
end

#unfollow_board(board_id) ⇒ Object



45
46
47
# File 'lib/pinterest/client/user.rb', line 45

def unfollow_board(board_id)
  delete("me/following/boards/#{board_id}")
end

#unfollow_interest(interest_id) ⇒ Object



53
54
55
# File 'lib/pinterest/client/user.rb', line 53

def unfollow_interest(interest_id)
  delete("me/following/interests/#{interest_id}")
end

#unfollow_user(user) ⇒ Object



37
38
39
# File 'lib/pinterest/client/user.rb', line 37

def unfollow_user(user)
  delete("me/following/users/#{user}")
end