Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for xml property 'seriescode', which is returned for things of type 'rpgitem' #58

Open
pants97 opened this issue Sep 4, 2024 · 0 comments

Comments

@pants97
Copy link

pants97 commented Sep 4, 2024

I submitted this PR in order to fix this issue: #57

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:

  • thing id 174620 is that of "Blades in the Dark" rpgitem, found at: https://boardgamegeek.com/rpgitem/174620/blades-in-the-dark
  • also tested with other rpgitems, like 146382 or 43842
  • also added a test file, however I had no experience with jest so I couldn't make it run, but it follows the same pattern as other tests so I expect it to run; I ask your indulgence on this, thanks!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant