QMK.js
    Preparing search index...

    Class QMK

    QMK API client

    const client = new QMK();
    
    Index

    Constructors

    Methods

    • Retrieve metadata for a single keyboard. Cached after first fetch.

      const kb = await client.keyboard('crkbd/rev1');
      

      Parameters

      • name: string

      Returns Promise<Keyboard | undefined>

    • Retrieve keyboard metadata. By default returns a name-only dictionary (keyboards values are undefined). Pass detailed: true to fetch full keyboard objects for every entry (~28MB download). Results are cached after the first fetch.

      const { keyboards } = await client.keyboards();
      const { keyboards } = await client.keyboards({ detailed: true });

      Parameters

      • options: { detailed: true }

      Returns Promise<KeyboardsResponse<Keyboard>>

    • Retrieve keyboard metadata. By default returns a name-only dictionary (keyboards values are undefined). Pass detailed: true to fetch full keyboard objects for every entry (~28MB download). Results are cached after the first fetch.

      const { keyboards } = await client.keyboards();
      const { keyboards } = await client.keyboards({ detailed: true });

      Parameters

      • Optionaloptions: { detailed?: false }

      Returns Promise<KeyboardsResponse>

    • Retrieve keyboard metadata by USB vendor and product ID. Returns an object since multiple keyboards can share a product ID.

      const keyboards = await client.product('0x04D8', '0xEED3');
      

      Parameters

      • vendor: string
      • product: string

      Returns Promise<KeyboardsMeta | undefined>

    • Get the readme for a keyboard

      const md = await client.readme('crkbd/rev1');
      

      Parameters

      • name: string

      Returns Promise<string>

    • Retrieve keyboards for a given USB vendor ID

      const products = await client.vendor('0x04D8');
      

      Parameters

      • vendor: string

      Returns Promise<Products | undefined>