Class: Flickr::Contacts
Defined Under Namespace
Classes: Contact
Constant Summary
Constants inherited from Base
Base::AUTH_ENDPOINT, Base::REST_ENDPOINT, Base::UPLOAD_ENDPOINT
Instance Attribute Summary
Attributes inherited from Base
#api_key, #api_secret, #token, #token_cache
Instance Method Summary collapse
-
#get_list(options = {}) ⇒ Object
Get the authorized user’s contact list.
-
#get_public_list(id, options = {}) ⇒ Object
Get a user’s public contact list.
-
#initialize(flickr) ⇒ Contacts
constructor
A new instance of Contacts.
Methods inherited from Base
#auth, #contacts, #people, #photos, #photosets, #send_request, #sign_request, #test, #uploader, #urls
Constructor Details
#initialize(flickr) ⇒ Contacts
Returns a new instance of Contacts.
2 3 4 |
# File 'lib/flickr/contacts.rb', line 2 def initialize(flickr) @flickr = flickr end |
Instance Method Details
#get_list(options = {}) ⇒ Object
Get the authorized user’s contact list.
21 22 23 24 |
# File 'lib/flickr/contacts.rb', line 21 def get_list(={}) rsp = @flickr.send_request('flickr.contacts.getList', ) collect_contacts(rsp) end |
#get_public_list(id, options = {}) ⇒ Object
Get a user’s public contact list.
Params
-
id (Required)
the nsid of the user to get information for
12 13 14 15 16 |
# File 'lib/flickr/contacts.rb', line 12 def get_public_list(id, ={}) .merge!({:user_id => id}) rsp = @flickr.send_request('flickr.contacts.getPublicList', ) collect_contacts(rsp) end |