Critique - danopia/deviantart-difi GitHub Wiki
preview
Usage
When previewing within the Critique box. Returns formatted preview.
Params
textfield
: string
Response
Returns the html
preview of the critique.
vote
Usage
When voting if a Critique was fair or unfair.
Params
critiqueid
: numberfair
: boolean (true
for fair,false
for not fair)
Response
A string that is displayed on the place of vote buttons, e.g.:
You thought it was fair
submit
Usage
When posting a new critique to a deviation
Params
deviationid
: numbertextfield value
: stringratings
: array, containing double the amount of stars (0-5 become 0-10, e.g. 3.5 becomes 7)
In the following order:vision
originality
technique
impact
validate_key
validate_token
Response
- On success, returns the
html
required to display the critique.
You can scrape for the content in the.gr-body
element:.author-icon a[href]
for the poster account url.author-icon a img.avatar[src]
contains the poster avatar url.author-icon a img.avatar[alt]
contains the:icon{username}:
format short link to avatar.author-icon a img.avatar[title]
contains the poster username.critique
contains the critique body.replies a[href]
contains the link to the critique- the
.ratings .score1 .ratingbox[rel]
to.ratings .score5 .ratingbox[rel]
contain the given rating scores from 1 to 5
(The score name can be found in.ratings .score1 label
to.ratings .score2 label
)- Score 1: Devious Rating
- Score 2: Vision
- Score 3: Originality
- Score 4: Technique
- Score 5: Impact
.summary
contains the number of "fair" and total votes (initially both are zero).artist_feedback
contains the artists' vote for "fair"-ness (initially empty)
- On fail, possible errors are:
error
: "Your Critique is too short! {number} is less than the minimum (100 words)"
delete
Usage
When deleting a posted critique from a deviation
Params
critiqueid
: numberuserid
: number
Response
- On success, undocumented
- On fail, possible errors are:
error
: "An error occurred."