⚔ rawg.io api client ⚔
An easy to use client with built-in caching
Built with ❤︎ by orels1
# with npmnpm i --save rawger#with yarnyarn add rawger
Check examples folder for more usage examples
const Rawger = ;// initialize rawger with default 60s cache// you can supply a different timeout (check examples folder)// or use rawger.purgeCache(); to force-clear the cache altogether// ⚠ starting with v1.1 you need to always await the init processconst rawger = await ;const users = rawger;// get "Currently Playing" games for userconst playing = await ;// get count of owned gamesconst owned = await ;// get raw api response object for "Want to Play" gamesconst raw = await ;// get user profileconst profile = await profile;
You can also initialize an authenticated client to perform such actions as game status updates, reviews publishing and so on.
const Rawger = ;// make sure to `await` the init processconst rawger = await;const users = rawger;// set FarCry 5 to "Currently Playing" for current accountawait ;