Class: Flickr::Api::Set
Instance Method Summary
collapse
-
#add_photo(set_id, photo_id, params = {}) ⇒ response
-
#create(params = {}) ⇒ Flickr::Object::Set
-
#delete(set_id, params = {}) ⇒ response
-
#edit_meta(set_id, params = {}) ⇒ response
-
#edit_photos(set_id, params = {}) ⇒ response
-
#get_info(set_id, params = {}) ⇒ Flickr::Object::Set
-
#get_photos(set_id, params = {}) ⇒ Flickr::Object::List<Flickr::Object::Photo>
-
#order(set_ids, params = {}) ⇒ response
-
#remove_photo(set_id, photo_id, params = {}) ⇒ response
-
#remove_photos(set_id, photo_ids, params = {}) ⇒ response
-
#reorder_photos(set_id, photo_ids, params = {}) ⇒ response
-
#set_primary_photo(set_id, photo_id, params = {}) ⇒ response
Methods inherited from Abstract
#find, #initialize, object_class
#autoload_dir, #autoload_names
Instance Method Details
#add_photo(set_id, photo_id, params = {}) ⇒ response
75
76
77
|
# File 'lib/flickr/api/set.rb', line 75
def add_photo(set_id, photo_id, params = {})
post "photosets.addPhoto", params.merge(photoset_id: set_id, photo_id: photo_id)
end
|
11
12
13
14
|
# File 'lib/flickr/api/set.rb', line 11
def create(params = {})
response = post "photosets.create", params
new_object(:Set, response["photoset"])
end
|
#delete(set_id, params = {}) ⇒ response
30
31
32
|
# File 'lib/flickr/api/set.rb', line 30
def delete(set_id, params = {})
post "photosets.delete", params.merge(photoset_id: set_id)
end
|
105
106
107
|
# File 'lib/flickr/api/set.rb', line 105
def edit_meta(set_id, params = {})
post "photosets.editMeta", params.merge(photoset_id: set_id)
end
|
#edit_photos(set_id, params = {}) ⇒ response
40
41
42
|
# File 'lib/flickr/api/set.rb', line 40
def edit_photos(set_id, params = {})
post "photosets.editPhotos", params.merge(photoset_id: set_id)
end
|
50
51
52
53
|
# File 'lib/flickr/api/set.rb', line 50
def get_info(set_id, params = {})
response = get "photosets.getInfo", params.merge(photoset_id: set_id)
new_object(:Set, response["photoset"])
end
|
63
64
65
66
|
# File 'lib/flickr/api/set.rb', line 63
def get_photos(set_id, params = {})
response = get "photosets.getPhotos", params.merge(photoset_id: set_id)
new_list(:Photo, response["photoset"]["photo"].map { |h| h.merge("owner" => response["photoset"]["owner"]) }, response["photoset"])
end
|
#order(set_ids, params = {}) ⇒ response
21
22
23
|
# File 'lib/flickr/api/set.rb', line 21
def order(set_ids, params = {})
post "photosets.orderSets", params.merge(photoset_ids: set_ids)
end
|
#remove_photo(set_id, photo_id, params = {}) ⇒ response
95
96
97
|
# File 'lib/flickr/api/set.rb', line 95
def remove_photo(set_id, photo_id, params = {})
post "photosets.removePhoto", params.merge(photoset_id: set_id, photo_id: photo_id)
end
|
#remove_photos(set_id, photo_ids, params = {}) ⇒ response
85
86
87
|
# File 'lib/flickr/api/set.rb', line 85
def remove_photos(set_id, photo_ids, params = {})
post "photosets.removePhotos", params.merge(photoset_id: set_id, photo_ids: photo_ids)
end
|
#reorder_photos(set_id, photo_ids, params = {}) ⇒ response
115
116
117
|
# File 'lib/flickr/api/set.rb', line 115
def reorder_photos(set_id, photo_ids, params = {})
post "photosets.reorderPhotos", params.merge(photoset_id: set_id, photo_ids: photo_ids)
end
|
#set_primary_photo(set_id, photo_id, params = {}) ⇒ response
125
126
127
|
# File 'lib/flickr/api/set.rb', line 125
def set_primary_photo(set_id, photo_id, params = {})
post "photosets.setPrimaryPhoto", params.merge(photoset_id: set_id, photo_id: photo_id)
end
|