Module: DeviantArt::Deviation
- Included in:
- Client
- Defined in:
- lib/deviantart/deviation.rb
Instance Method Summary collapse
-
#download_deviation(deviationid) ⇒ Object
Get the original file download (if allowed).
-
#get_deviation(deviationid) ⇒ Object
Fetch a deviation details.
-
#get_deviation_content(deviationid) ⇒ Object
Fetch full data that is not included in the main devaition details.
-
#get_deviation_whofaved(deviationid, offset: 0, limit: 10) ⇒ Object
Fetch a list of users who faved the deviation.
Instance Method Details
#download_deviation(deviationid) ⇒ Object
Get the original file download (if allowed)
23 24 25 |
# File 'lib/deviantart/deviation.rb', line 23 def download_deviation(deviationid) perform(:get, "/api/v1/oauth2/deviation/download/#{deviationid}") end |
#get_deviation(deviationid) ⇒ Object
Fetch a deviation details
4 5 6 |
# File 'lib/deviantart/deviation.rb', line 4 def get_deviation(deviationid) perform(:get, "/api/v1/oauth2/deviation/#{deviationid}") end |
#get_deviation_content(deviationid) ⇒ Object
Fetch full data that is not included in the main devaition details
9 10 11 |
# File 'lib/deviantart/deviation.rb', line 9 def get_deviation_content(deviationid) perform(:get, '/api/v1/oauth2/deviation/content', { deviationid: deviationid }) end |
#get_deviation_whofaved(deviationid, offset: 0, limit: 10) ⇒ Object
Fetch a list of users who faved the deviation
14 15 16 17 18 19 20 |
# File 'lib/deviantart/deviation.rb', line 14 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(:get, '/api/v1/oauth2/deviation/whofaved', params) end |