Class: Myflickr::User

Inherits:
Struct
  • Object
show all
Defined in:
lib/myflickr/user.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#realnameObject

Returns the value of attribute realname

Returns:

  • (Object)

    the current value of realname



2
3
4
# File 'lib/myflickr/user.rb', line 2

def realname
  @realname
end

#usernameObject

Returns the value of attribute username

Returns:

  • (Object)

    the current value of username



2
3
4
# File 'lib/myflickr/user.rb', line 2

def username
  @username
end

Class Method Details

.findObject



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

def find
  user_lookup = Query.api_call("flickr.people.getInfo")
  User.new(*%w(username realname).map {|a| (user_lookup/a).inner_text.to_s })
end