Skip to content

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

Open
@pants97

Description

@pants97

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions