About
This is a wrapper for the DeviantArt API that covers all of the public endpoints, includes typings, and various utility functions to make finding deviations easier.
Insall
npm install deviantart.ts
Getting Started
Register an app at DeviantArt Developers in order to receive a client id and a client secret. You will need these credentials in order to receive an access token from the DeviantArt API. Read the official api documentation for information on all of the endpoints, the parameters that they take, and the responses that they send. This library only covers the client credentials endpoints.
Useful Links
Searching for Deviations
useAPI
Searching for Users and Folders
Searching for Comments and Tags
Other endpoints and parameters
There are many more less commonly used endpoints such as Curated, Stash, and Data. For a more complete documentation please read the api documentation on DeviantArt.
Common Parameters:
mature_content
- set to true to include mature results.expand
- Expands the response objects, such as includinguser.details
in aDeviantArtUser
object. You may need to use type assertions if you use.offset
- Returns results starting from the offsetlimit
- Returns a certain amount of resultsdeviationid
- The deviation id. All id's look like:1FA35A6D-E2CD-3CDF-1A65-410AB577BF10
.userid
- The user id.commentid
- The comment id.folderid
- The folder id.statusid
- The status id.category_path
- The category path to search.q
- The query to search.timerange
- Timerange to search Ex.(8hr, 5days, 2weeks, alltime)
date
- The date inyyyy-mm-dd
format
Common Types
DeviantArtDeviation
DeviantArtUser
DeviantArtUserProfile
DeviantArtComment
Extending Deviations
The API Deviation object and the RSS Deviation object are missing a couple properties from each other, most notably the deviation description and the author's profile info respectively. There are some extending functions that will extend the objects to add these missing properties.