Class: Vimeo::Advanced::Person

Inherits:
Base
  • Object
show all
Defined in:
lib/vimeo/advanced/person.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #login_link, #upload_sig

Constructor Details

This class inherits a constructor from Vimeo::Advanced::Base

Instance Method Details

#add_contact(user_id, auth_token) ⇒ Object

TODO: Not working on Vimeo’s side



47
48
49
50
51
52
53
54
55
# File 'lib/vimeo/advanced/person.rb', line 47

def add_contact(user_id, auth_token)
  sig_options = {
    :user_id => user_id,
    :auth_token => auth_token,
    :method => "vimeo.people.addContact"
  }

  make_request sig_options
end

#add_subscription(user_id, type, auth_token) ⇒ Object

TODO: Verify input for type?



79
80
81
82
83
84
85
86
87
88
# File 'lib/vimeo/advanced/person.rb', line 79

def add_subscription(user_id, type, auth_token)
  sig_options = {
    :user_id => user_id,
    :type => type,
    :auth_token => auth_token,
    :method => "vimeo.people.addSubscription"
  }

  make_request sig_options
end

#find_by_email(find_email) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/vimeo/advanced/person.rb', line 15

def find_by_email(find_email)
  sig_options = {
    :find_email => find_email,
    :method => "vimeo.people.findByEmail"
  }

  make_request sig_options
end

#find_by_user_name(username) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/vimeo/advanced/person.rb', line 6

def find_by_user_name(username)
  sig_options = {
    :username => username,
    :method => "vimeo.people.findByUserName"
  }

  make_request sig_options
end

#get_info(user_id) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/vimeo/advanced/person.rb', line 24

def get_info(user_id)
  sig_options = {
    :user_id => user_id,
    :method => "vimeo.people.getInfo"
  }

  make_request sig_options
end

#get_portrait_url(user_id, options = {}) ⇒ Object

TODO: This seems to be returning nil from Vimeo… not implemented?



34
35
36
37
38
39
40
41
42
43
44
# File 'lib/vimeo/advanced/person.rb', line 34

def get_portrait_url(user_id, options={})
  size = options[:size]

  sig_options = {
    :user_id => user_id,
    :method => "vimeo.people.getPortraitUrl"
  }
  sig_options.merge! :size => size unless size.nil?

  make_request sig_options
end

#get_upload_status(user_id, auth_token) ⇒ Object



68
69
70
71
72
73
74
75
76
# File 'lib/vimeo/advanced/person.rb', line 68

def get_upload_status(user_id, auth_token)
  sig_options = {
    :user_id => user_id,
    :auth_token => auth_token,
    :method => "vimeo.people.getUploadStatus"
  }

  make_request sig_options
end

#remove_contact(user_id, auth_token) ⇒ Object

TODO: Not working on Vimeo’s side



58
59
60
61
62
63
64
65
66
# File 'lib/vimeo/advanced/person.rb', line 58

def remove_contact(user_id, auth_token)
  sig_options = {
    :user_id => user_id,
    :auth_token => auth_token,
    :method => "vimeo.people.removeContact"
  }

  make_request sig_options
end

#remove_subscription(user_id, type, auth_token) ⇒ Object

TODO: Verify input for type?



91
92
93
94
95
96
97
98
99
100
# File 'lib/vimeo/advanced/person.rb', line 91

def remove_subscription(user_id, type, auth_token)
  sig_options = {
    :user_id => user_id,
    :type => type,
    :auth_token => auth_token,
    :method => "vimeo.people.removeSubscription"
  }

  make_request sig_options
end