The {@link RequestInfo} passed to fetch
Issue a simple get request and return JSON content
The URI the GET request will be sent to
Optional query params object
Convert a numeric vendor or product ID to a hex representation used by QMK
A numeric vendor ID or product ID
Hex string in the format 0x0000
Retrieve metadata about keyboards
const { git_hash, last_updated, keyboards } = await keyboards('https://api.qmk.fm/v1/', 'massdrop/alt');
The QMK API url
Provide one or more keyboard names, or use the special "all" keyword
Issue a post request and return the deserialized json response content
The URI the POST request will be sent to
Optional PostData sent to the URI as JSON content
Optional query parameters added to the provided URI
Get the readme file associated with the keyboard
The QMK API endpoint
The name of the keyboard
const altReadme = await readme('https://api.qmk.fm/v1/', 'massdrop/alt');
Retrieve keyboard metadata by vendor and product ID
const vendor = '0x04D8';
const { [vendor]: massdrop } = await usb('https://api.qmk.fm/v1/');
console.info(massdrop);
The QMK API url
Generated using TypeDoc
Simple wrapper around fetch. If the response code is OK .json() is called on the response. Otherwise a RequestError will be raised https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch