class VineApi::User
Public Class Methods
new(email, password)
click to toggle source
# File lib/vine_api/user.rb, line 9 def initialize(email, password) data = post('/users/authenticate', :username => email, :password => password) @key = data['key'] end
Public Instance Methods
logout()
click to toggle source
# File lib/vine_api/user.rb, line 38 def logout delete('/users/authenticate') end
notifications(user_id)
click to toggle source
# File lib/vine_api/user.rb, line 26 def notifications(user_id) get("/users/#{user_id}/pendingNotificationsCount") end
popular(user_id = nil)
click to toggle source
# File lib/vine_api/user.rb, line 30 def popular(user_id = nil) if user_id get("/users/profiles/#{user_id}") else get('/users/me') end end
profile()
click to toggle source
# File lib/vine_api/user.rb, line 14 def profile get('/users/me') end
tag(tag)
click to toggle source
# File lib/vine_api/user.rb, line 22 def tag(tag) get("/timelines/tags/#{tag}") end
timeline(user_id)
click to toggle source
# File lib/vine_api/user.rb, line 18 def timeline(user_id) get("/timelines/users/#{user_id}") end