2.0.2 • Published 5 years ago
bgg2json v2.0.2
BGG2JSON
It's a simple library providing just a single function that returns requested BGG data as a JavaScript object.
It uses axios under the hood, so the return value is wrapped with AxiosResponse - just to provide all the data about the response from API.
The main data sits in data property of that response object.
Example usage:
import bgg2json from 'bgg2json';
const { data } = await bgg2json('user', { name: 'Qrzy88' });
console.log(data.id); // displays: 1381959bgg2json takes 2 parameters:
- BGG API resource name
- resource parameters as object - for better DX the parameters are typed, but the type is a union of types given to the wrappers listed below
Wrappers
There are also wrappers available for certain resources that accept params (already typed) as the only argument:
getBggCollection(params)getBggFamily(params)getBggForum(params)getBggForumlist(params)getBggGeeklist(params)getBggGuild(params)getBggHot(params)getBggPlays(params)getBggSearch(params)getBggThing(params)getBggThread(params)getBggUser(params)
2.0.2
5 years ago
2.0.0
5 years ago
1.5.3
5 years ago
1.5.2
5 years ago
1.5.1
5 years ago
1.3.0
5 years ago
1.2.7
5 years ago
1.2.5
5 years ago
1.2.4
5 years ago
1.2.3
5 years ago
1.2.2
5 years ago
1.2.1
5 years ago
1.2.0
5 years ago
1.1.1
5 years ago
1.0.2
5 years ago
1.1.3
5 years ago
1.0.1
6 years ago
1.1.2
6 years ago
1.1.0
6 years ago
1.0.0
6 years ago