Module: DeviantArt::Client::Collections

Included in:
DeviantArt::Client
Defined in:
lib/deviantart/client/collections.rb

Instance Method Summary collapse

Instance Method Details

#get_collections(folderid, username: nil, offset: 0, limit: 10) ⇒ Object

Fetch collection folder contents



19
20
21
22
23
24
25
# File 'lib/deviantart/client/collections.rb', line 19

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(DeviantArt::Collections, :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



8
9
10
11
12
13
14
15
16
# File 'lib/deviantart/client/collections.rb', line 8

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(DeviantArt::Collections::Folders, :get, '/api/v1/oauth2/collections/folders', params)
end