Class: Rumblr::User

Inherits:
Resource show all
Defined in:
lib/rumblr/user.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Rumblr::Resource

Instance Attribute Details

#can_upload_aiffObject (readonly)

Returns the value of attribute can_upload_aiff.



4
5
6
# File 'lib/rumblr/user.rb', line 4

def can_upload_aiff
  @can_upload_aiff
end

#can_upload_audioObject (readonly)

Returns the value of attribute can_upload_audio.



4
5
6
# File 'lib/rumblr/user.rb', line 4

def can_upload_audio
  @can_upload_audio
end

#can_upload_videoObject (readonly)

Returns the value of attribute can_upload_video.



4
5
6
# File 'lib/rumblr/user.rb', line 4

def can_upload_video
  @can_upload_video
end

#emailObject (readonly)

Returns the value of attribute email.



4
5
6
# File 'lib/rumblr/user.rb', line 4

def email
  @email
end

#passwordObject (readonly)

Returns the value of attribute password.



4
5
6
# File 'lib/rumblr/user.rb', line 4

def password
  @password
end

#vimeo_login_urlObject (readonly)

Returns the value of attribute vimeo_login_url.



4
5
6
# File 'lib/rumblr/user.rb', line 4

def 
  @vimeo_login_url
end

Class Method Details

.login(attrs = {}) ⇒ Object



19
20
21
22
# File 'lib/rumblr/user.rb', line 19

def (attrs={})
  email, password = attrs[:email], attrs[:password]
  Client.instance.authenticate(email,password)
end

Instance Method Details

#authObject



14
15
16
# File 'lib/rumblr/user.rb', line 14

def auth
  {:email => self.email, :password => self.password}
end

#primary_tumblelogObject



10
11
12
# File 'lib/rumblr/user.rb', line 10

def primary_tumblelog
  self.tumblelogs.find { |log| log.primary? }
end

#tumblelogsObject



6
7
8
# File 'lib/rumblr/user.rb', line 6

def tumblelogs
  instance_variable_get(:@tumblelogs) || []
end