Object
true if this person is a Flickr admin, false otherwise.
# File lib/net/flickr/person.rb, line 48 def admin? infoxml = get_info return infoxml['isadmin'] == '1' end
true if this person is a contact of the calling user, false otherwise. This method requires authentication with read permission. In all other cases, it returns false.
# File lib/net/flickr/person.rb, line 56 def contact? infoxml = get_info if contact = infoxml['contact'] return contact == '1' end return false end
true if this person is a family member of the calling user, false otherwise. This method requires authentication with read permission. In all other cases, it returns false.
# File lib/net/flickr/person.rb, line 69 def family? infoxml = get_info if family = infoxml['family'] return family == '1' end return false end
true if this person is a friend of the calling user, false otherwise. This method requires authentication with read permission. In all other cases, it returns false.
# File lib/net/flickr/person.rb, line 82 def friend? infoxml = get_info if friend = infoxml['friend'] return friend == '1' end return false end
Gets this person's gender (e.g., 'M'). This method requires authentication with read permission and only returns information for contacts of the calling user. In all other cases, it returns nil.
# File lib/net/flickr/person.rb, line 95 def gender infoxml = get_info return infoxml['gender'] end
TODO: Implement Flickr.person.groups
# File lib/net/flickr/person.rb, line 101 def groups end
Gets the URL of this person's buddy icon.
# File lib/net/flickr/person.rb, line 105 def icon_url infoxml = get_info icon_server = infoxml['iconserver'] icon_farm = infoxml['iconfarm'] if icon_server.to_i <= 0 return 'http://www.flickr.com/images/buddyicon.jpg' else return "http://farm#{icon_farm}.static.flickr.com/#{icon_server}/buddyicons/#{@id}.jpg" end end
true if this person is an ignored contact of the calling user, false otherwise. This method requires authentication with read permission and only returns information for contacts of the calling user. In all other cases, it returns false.
# File lib/net/flickr/person.rb, line 122 def ignored? infoxml = get_info if ignored = infoxml['ignored'] return ignored == '1' end return false end
Gets this person's location.
# File lib/net/flickr/person.rb, line 133 def location infoxml = get_info return infoxml.at('location').inner_text end
Gets the mobile URL of this person's photos.
# File lib/net/flickr/person.rb, line 139 def mobile_url infoxml = get_info return infoxml.at('mobileurl').inner_text end
Gets the total number of photos uploaded by this user.
# File lib/net/flickr/person.rb, line 145 def photo_count infoxml = get_info return infoxml.at('photos/count').inner_text.to_i end
Gets the URL of this person's photo stream.
# File lib/net/flickr/person.rb, line 151 def photo_url infoxml = get_info return infoxml.at('photosurl').inner_text end
Gets the number of times this person's photo stream has been viewed. This method requires authentication with read permission and only returns information for the calling user. In all other cases, it returns nil.
# File lib/net/flickr/person.rb, line 159 def photo_views infoxml = get_info if views = infoxml.at('photos/views') return views.inner_text.to_i end return nil end
Gets a list of public photos for this person.
See flickr.com/services/api/flickr.people.getPublicPhotos.html for details.
# File lib/net/flickr/person.rb, line 173 def photos(args = {}) return @flickr.photos.user(@id, args) end
true if this person is a Flickr Pro user, false otherwise.
# File lib/net/flickr/person.rb, line 178 def pro? infoxml = get_info return infoxml['ispro'] == '1' end
Gets the URL of this person's profile.
# File lib/net/flickr/person.rb, line 184 def profile_url infoxml = get_info return infoxml.at('profileurl').inner_text end
Gets this person's real name (e.g., 'John Doe').
# File lib/net/flickr/person.rb, line 190 def realname infoxml = get_info return infoxml.at('realname').inner_text end
true if the calling user is a contact of this person, false otherwise. This method requires authentication with read permission. In all other cases, it returns false.
# File lib/net/flickr/person.rb, line 198 def rev_contact? infoxml = get_info if rev_contact = infoxml['revcontact'] return rev_contact == '1' end return false end
true if this person considers the calling user family, false otherwise. This method requires authentication with read permission. In all other cases, it returns false.
# File lib/net/flickr/person.rb, line 211 def rev_family? infoxml = get_info if rev_family = infoxml['revfamily'] return rev_family == '1' end return false end
true if this person considers the calling user a friend, false otherwise. This method requires authentication with read permission. In all other cases, it returns false.
# File lib/net/flickr/person.rb, line 224 def rev_friend? infoxml = get_info if rev_friend = infoxml['revfriend'] return rev_friend == '1' end return false end
Generated with the Darkfish Rdoc Generator 2.