Class: RedHaze::User

Inherits:
Object
  • Object
show all
Includes:
Helpers::Resource
Defined in:
lib/red_haze/user.rb

Direct Known Subclasses

Me

Instance Attribute Summary

Attributes included from Helpers::Resource

#id

Instance Method Summary collapse

Methods included from Helpers::Resource

#delete_endpoint, #get_endpoint, included, #initialize, #put_endpoint, #sync, #url

Instance Method Details

#commentsObject



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

def comments
  get_endpoint('/comments')
end

#favoritesObject



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

def favorites
  get_endpoint('/favorites')
end

#followersObject



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

def followers
  get_endpoint('/followers')
end

#followings(user_id = nil) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/red_haze/user.rb', line 5

def followings(user_id=nil)
  if user_id.nil?
    get_endpoint('/followings')
  else
    response = get("/followings/#{user_id}")
  end
end

#groupsObject



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

def groups
  get_endpoint('/groups')
end

#playlistsObject



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

def playlists
  get_endpoint('/playlists')
end