module DeviantArt::Client::Deviation
Public Instance Methods
download_deviation(deviationid)
click to toggle source
Get the original file download (if allowed)
# File lib/deviantart/client/deviation.rb, line 52 def download_deviation(deviationid) perform(DeviantArt::Deviation::Download, :get, "/api/v1/oauth2/deviation/download/#{deviationid}") end
get_deviation(deviationid)
click to toggle source
Fetch a deviation details
# File lib/deviantart/client/deviation.rb, line 12 def get_deviation(deviationid) perform(DeviantArt::Deviation, :get, "/api/v1/oauth2/deviation/#{deviationid}") end
get_deviation_content(deviationid)
click to toggle source
Fetch full data that is not included in the main devaition details
# File lib/deviantart/client/deviation.rb, line 17 def get_deviation_content(deviationid) perform(DeviantArt::Deviation::Content, :get, '/api/v1/oauth2/deviation/content', { deviationid: deviationid }) end
get_deviation_embeddedcontent(deviationid, offset_deviationid: nil, offset: 0, limit: 10)
click to toggle source
Fetch content embedded in a deviation. Journal and literature deviations support embedding of deviations inside them.
# File lib/deviantart/client/deviation.rb, line 23 def get_deviation_embeddedcontent(deviationid, offset_deviationid: nil, offset: 0, limit: 10) params = { deviationid: deviationid } params['offset_deviationid'] = offset_deviationid if offset_deviationid params['offset'] = offset if offset != 0 params['limit'] = limit if limit != 10 perform(DeviantArt::Deviation::EmbeddedContent, :get, '/api/v1/oauth2/deviation/embeddedcontent', params) end
get_deviation_metadata(deviationids, ext_submission: false, ext_camera: false, ext_stats: false, ext_collection: false)
click to toggle source
Fetch deviation metadata for a set of deviations. This endpoint is limited to 50 deviations per query when fetching the base data and 10 when fetching extended data.
# File lib/deviantart/client/deviation.rb, line 33 def get_deviation_metadata(deviationids, ext_submission: false, ext_camera: false, ext_stats: false, ext_collection: false) params = { deviationids: deviationids.is_a?(Enumerable) ? deviationids : [deviationids] } params['ext_submission'] = ext_submission params['ext_camera'] = ext_camera params['ext_stats'] = ext_stats params['ext_collection'] = ext_collection perform(DeviantArt::Deviation::Metadata, :get, '/api/v1/oauth2/deviation/metadata', params) end
get_deviation_whofaved(deviationid, offset: 0, limit: 10)
click to toggle source
Fetch a list of users who faved the deviation
# File lib/deviantart/client/deviation.rb, line 43 def get_deviation_whofaved(deviationid, offset: 0, limit: 10) params = {} params['deviationid'] = deviationid params['offset'] = offset if offset != 0 params['limit'] = limit if limit != 10 perform(DeviantArt::Deviation::WhoFaved, :get, '/api/v1/oauth2/deviation/whofaved', params) end