Thank you for this! Just tried it out, but I'm getting some errors.
Running this code:
import { BggClient } from "boardgamegeekclient";
const client = BggClient.Create();
async function search() {
const result = await client.search.query({
type: ["boardgame", "boardgameexpansion"],
query: "Exit The Game",
exact: undefined,
});
console.log(result);
}
search();
I get the following error:
TypeError: Cannot read properties of undefined (reading 'toString')
at /bgg-thing/node_modules/boardgamegeekclient/dist/src/query/concrete/GenericQueryBuilder.ts:7:61
at Array.map (<anonymous>)
at GenericQueryBuilder.build (/bgg-thing/node_modules/boardgamegeekclient/dist/src/query/concrete/GenericQueryBuilder.ts:7:10)
at BggSearchClient.<anonymous> (/bgg-thing/node_modules/boardgamegeekclient/dist/src/client/concrete/BggSearchClient.ts:28:42)
at Generator.next (<anonymous>)
at /bgg-thing/node_modules/boardgamegeekclient/dist/cjs/client/concrete/BggSearchClient.js:8:71
at new Promise (<anonymous>)
at __awaiter (/bgg-thing/node_modules/boardgamegeekclient/dist/cjs/client/concrete/BggSearchClient.js:4:12)
at BggSearchClient.query (/bgg-thing/node_modules/boardgamegeekclient/dist/cjs/client/concrete/BggSearchClient.js:22:16)
at /bgg-thing/test.ts:6:38
Running this code:
I get the following error:
Originally posted by @benjick in https://github.com/LearningProcesss/boardgamegeekjsclient/issues/27#issuecomment-1159570244