Module: DeviantArt::Client::Gallery
- Included in:
- DeviantArt::Client
- Defined in:
- lib/deviantart/client/gallery.rb
Instance Method Summary collapse
-
#get_gallery(username: nil, folderid: nil, mode: nil, offset: 0, limit: 10) ⇒ Object
Fetch gallery folder contents.
-
#get_gallery_all(username: nil, offset: 0, limit: 10) ⇒ Object
Get the “all” view of a users gallery.
-
#get_gallery_folders(username: nil, calculate_size: false, ext_preload: false, offset: 0, limit: 10) ⇒ Object
Fetch gallery folders.
Instance Method Details
#get_gallery(username: nil, folderid: nil, mode: nil, offset: 0, limit: 10) ⇒ Object
Fetch gallery folder contents
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/deviantart/client/gallery.rb', line 29 def get_gallery(username: nil, folderid: nil, mode: nil, offset: 0, limit: 10) params = {} params['username'] = username unless username.nil? params['mode'] = mode unless mode.nil? params['offset'] = offset if offset != 0 params['limit'] = limit if limit != 10 unless folderid.nil? path = "/api/v1/oauth2/gallery/#{folderid}" else path = '/api/v1/oauth2/gallery/' end perform(DeviantArt::Gallery, :get, path, params) end |
#get_gallery_all(username: nil, offset: 0, limit: 10) ⇒ Object
Get the “all” view of a users gallery
9 10 11 12 13 14 15 |
# File 'lib/deviantart/client/gallery.rb', line 9 def get_gallery_all(username: nil, offset: 0, limit: 10) params = {} params['username'] = username unless username.nil? params['offset'] = offset if offset != 0 params['limit'] = limit if limit != 10 perform(DeviantArt::Gallery::All, :get, '/api/v1/oauth2/gallery/all', params) end |
#get_gallery_folders(username: nil, calculate_size: false, ext_preload: false, offset: 0, limit: 10) ⇒ Object
Fetch gallery folders
18 19 20 21 22 23 24 25 26 |
# File 'lib/deviantart/client/gallery.rb', line 18 def get_gallery_folders(username: nil, calculate_size: false, ext_preload: false, offset: 0, limit: 10) params = {} params['username'] = username unless username.nil? params['calculate_size'] = calculate_size if calculate_size params['ext_preload'] = ext_preload if ext_preload params['offset'] = offset if offset != 0 params['limit'] = limit if limit != 10 perform(DeviantArt::Gallery::Folders, :get, '/api/v1/oauth2/gallery/folders', params) end |