Sha256: ae71f4c130228849454c1501bd92d77e8e9101ee87fa122ff9576174ce634779

Contents?: true

Size: 475 Bytes

Versions: 4

Compression:

Stored size: 475 Bytes

Contents

module Flickry
  class Person < Flickry::Base
    def initialize(user)
      super(nil)
      extract_attrs!(user, [:location, :nsid, :realname, :username, :photosurl, :profileurl])
    end
    
    def self.find(nsid)
      if person = flickr.people.getInfo(:user_id => nsid)
        return new(person)
      else
        return nil
      end
    end
    
    def profile
      clean(self.profileurl)
    end
    
    def photos
      clean(self.photosurl)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wideopenspaces-flickry-0.1.5 lib/flickry/person.rb
wideopenspaces-flickry-0.1.6 lib/flickry/person.rb
wideopenspaces-flickry-0.2.0 lib/flickry/person.rb
wideopenspaces-flickry-0.2.1 lib/flickry/person.rb