Class: Vimeo::Simple::User

Inherits:
Base
  • Object
show all
Defined in:
lib/vimeo/simple/user.rb

Class Method Summary collapse

Class Method Details

.albums(username) ⇒ Object

Returns a list of a user’s albums.

Parameters:

  • username (String)

    The user’s id or username.



55
56
57
# File 'lib/vimeo/simple/user.rb', line 55

def self.albums(username)
  get("/#{username}/albums.json")
end

.all_videos(username) ⇒ Object

Returns a list of all videos that are related to a user.

Parameters:

  • username (String)

    The user’s id or username.



41
42
43
# File 'lib/vimeo/simple/user.rb', line 41

def self.all_videos(username)
  get("/#{username}/all_videos.json")
end

.appears_in(username) ⇒ Object

Returns a list of the videos a user appears in.

Parameters:

  • username (String)

    The user’s id or username.



34
35
36
# File 'lib/vimeo/simple/user.rb', line 34

def self.appears_in(username)
  get("/#{username}/appears_in.json")
end

.channels(username) ⇒ Object

Returns a list of a user’s channels.

Parameters:

  • username (String)

    The user’s id or username.



62
63
64
# File 'lib/vimeo/simple/user.rb', line 62

def self.channels(username)
  get("/#{username}/channels.json")
end

.contacts_like(username) ⇒ Object

Returns a list of videos that a user’s contacts liked.

Parameters:

  • username (String)

    The user’s id or username.



83
84
85
# File 'lib/vimeo/simple/user.rb', line 83

def self.contacts_like(username)
  get("/#{username}/contacts_like.json")
end

.contacts_videos(username) ⇒ Object

Returns a list of a user’s contact’s videos.

Parameters:

  • username (String)

    The user’s id or username.



76
77
78
# File 'lib/vimeo/simple/user.rb', line 76

def self.contacts_videos(username)
  get("/#{username}/contacts_videos.json")
end

.groups(username) ⇒ Object

Returns a list of a user’s groups.

Parameters:

  • username (String)

    The user’s id or username.



69
70
71
# File 'lib/vimeo/simple/user.rb', line 69

def self.groups(username)
  get("/#{username}/groups.json")
end

.info(username) ⇒ Object

Returns a user’s metadata.

Parameters:

  • username (String)

    The user’s id or username.



8
9
10
# File 'lib/vimeo/simple/user.rb', line 8

def self.info(username)
  get("/#{username}/info.json")
end

.likes(username) ⇒ Object

Returns a list of a user’s liked videos.

Parameters:

  • username (String)

    The user’s id or username.



27
28
29
# File 'lib/vimeo/simple/user.rb', line 27

def self.likes(username)
  get("/#{username}/likes.json")
end

.subscriptions(username) ⇒ Object

Returns a list of a user’s subscriptions.

Parameters:

  • username (String)

    The user’s id or username.



48
49
50
# File 'lib/vimeo/simple/user.rb', line 48

def self.subscriptions(username)
  get("/#{username}/subscriptions.json")
end

.videos(username, page = 1) ⇒ Object

Returns a list of a user’s videos.

Parameters:

  • username (String)

    The user’s id or username.

  • page, (Integer)

    is the desired Page (1, 2, or 3. Default is 1)



16
17
18
19
20
21
22
# File 'lib/vimeo/simple/user.rb', line 16

def self.videos(username, page=1)
  if page
    get("/#{username}/videos.json?page=#{page}")          
  else
    get("/#{username}/videos.json")
  end
end