LearningProcesss / boardgamegeekjsclient

Typescript written API wrapper for Boardgamegeek XML2 API
MIT License
18 stars 6 forks source link

fix: add support for xml property 'seriescode' #57

Open pants97 opened 2 months ago

pants97 commented 2 months ago

add support for xml property 'seriescode', which is returned as <seriescode value="" /> for things of type 'rpgitem';

bug: when requesting a thing of type 'rpgitem' the thing's dto parser errors out with an unknown property error:

Error: Unknown property "seriescode" for BggThingDto at [Source ...]
    at .\node_modules\boardgamegeekclient\dist\cjs\dto\dtoparser\concrete\BggThingDtoParser.js:12:33

steps to reproduce:

import {BggClient} from 'boardgamegeekclient'
BggClient.Create()
    .thing
    .query({id: 174620})
    .then(console.info)
    .catch(console.error)

fix: by adding definitions to support that property the parser does not fail anymore and produces a result as expected;

notes: