A Node.js wrapper for the IGDB.com Free Video Game Database API.
One of the principles behind IGDB.com is accessibility of data. We wish to share the data with anyone who wants to build cool videogame oriented websites, apps and services. This means that the information you contribute to IGDB.com can be used by other projects as well.
Thus, you are not only contributing to the value of this site but to thousands of other projects as well. We are looking forward to see what exciting game related projects you come up with. Happy coding!
More info here:
Installation and Setup
$ npm install igdb-api-node
In your code:
const igdb = default;
ES6 or later:
Using your API key
- Pass API key directly:
const client = ;
- OR set a process environment variable:
$ IGDB_API_KEY='YOUR_API_KEY' node yourCode.js
This library wraps node-apicalypse and further examples can be seen here: https://github.com/igdb/node-apicalypse
// Example using all methods.const response = await// fetches only the name, movies, and age fields// same as above// limit to 50 results// offset results by 10// default sort direction is 'asc' (ascending)// sorts by name, descending// search for a specific name (search implementations can vary)// filter the results; // execute the query and return a response objectconsole;
igdb-api-node provides handy method for generating tag numbers when doing advanced filtering.
category- An integer representing the tag category (game, genre, theme)
id- The ID of the category entity
;const client =category = 1 // Genreid = 5; // Shooterclient; // 268435461
More tag number options and information are available in the IGDB API documentation.