Options
All
  • Public
  • Public/Protected
  • All
Menu

Class QMK

QMK API client, specify a version to begin interacting with the API

const client: QMKClient = new QMKClient('v1');

Hierarchy

  • QMK

Index

Constructors

Properties

Methods

Constructors

constructor

  • Parameters

    Returns QMK

Properties

url

url: string

Methods

keyboards

  • Retrieve metadata about keyboards

    const { git_hash, last_updated, keyboards } = await client.keyboards('massdrop/alt');

    Parameters

    • Rest ...names: string[]

      Provide one or more keyboard names, or use the special "all" keyword

    Returns Promise<KeyboardsResponse>

product

  • product(vendor: string, product: string): Promise<KeyboardsMeta | undefined>
  • Retrieve keyboard metadata by product ID. Product IDs can be shared among multiple keyboards. As a result, an object will always be returned from this function, even if there's only one matching keyboard

    const vendor = '0x04D8'; // Massdrop
    const product = '0xEED3'; // Alt
    const keyboards = await client.product(vendor, product);
    console.info(keyboards);

    Parameters

    • vendor: string
    • product: string

    Returns Promise<KeyboardsMeta | undefined>

readme

  • readme(name: string): Promise<string>
  • Get the readme file associated with the keyboard

    Parameters

    • name: string

      The name of the keyboard

      const readme = await client.readme('massdrop/alt');

    Returns Promise<string>

usb

  • Retrieve keyboard metadata by vendor and product ID

    const vendor = '0x04D8';
    const { [vendor]: massdrop } = await client.usb('https://api.qmk.fm/');
    console.info(massdrop);

    Returns Promise<Vendors>

vendor

  • vendor(vendor: string): Promise<Products | undefined>
  • Retrieve keyboard metadata by vendor ID

    const vendor = '0x04D8'; // Massdrop
    const massdropKeyboards = await client.vendor(vendor);
    console.info(massdropKeyboards);

    Parameters

    • vendor: string

    Returns Promise<Products | undefined>

Generated using TypeDoc