Module: DeviantArt::Collections
- Included in:
- Client
- Defined in:
- lib/deviantart/collections.rb
Instance Method Summary collapse
-
#get_collections(folderid, username: nil, offset: 0, limit: 10) ⇒ Object
Fetch collection folder contents.
-
#get_collections_folders(username: nil, calculate_size: false, ext_preload: false, offset: 0, limit: 10) ⇒ Object
Fetch collection folders.
Instance Method Details
#get_collections(folderid, username: nil, offset: 0, limit: 10) ⇒ Object
Fetch collection folder contents
15 16 17 18 19 20 21 |
# File 'lib/deviantart/collections.rb', line 15 def get_collections(folderid, 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(:get, "/api/v1/oauth2/collections/#{folderid}", params) end |
#get_collections_folders(username: nil, calculate_size: false, ext_preload: false, offset: 0, limit: 10) ⇒ Object
Fetch collection folders
4 5 6 7 8 9 10 11 12 |
# File 'lib/deviantart/collections.rb', line 4 def get_collections_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(:get, '/api/v1/oauth2/collections/folders', params) end |