Skip to content

Creatures endpoint return race value straight from URL #234

@tobiasehlert

Description

@tobiasehlert

Creatures endpoint use the race parameter as provided in the API URL.

Example URL:
https://dev.tibiadata.com/v4/creature/DeMonS

Issue:

{
  "creature": {
    "name": "Demons",
    "race": "DeMonS",
    "image_url": "https://static.tibia.com/images/library/demon.gif",
    ...

Expected:

{
  "creature": {
    "name": "Demons",
    "race": "demon",
    "image_url": "https://static.tibia.com/images/library/demon.gif",
    ...

Following if statement will also not evaluate correct, when race is not exact string as in parsed HTML.
https://github.com/TibiaData/tibiadata-api-go/blob/f42e70fb178df7b48c065e2a41cfca06cc99a874/src/TibiaCreaturesCreature.go#L88

Suggestion:
We should probably use the race value from the static tibia image link to compare with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions