TibiaData / tibiadata-api-go

TibiaData API written in Golang and deployed in container (version v3 and above).
https://api.tibiadata.com
MIT License
84 stars 28 forks source link

[bug] characters title throws atoi error on grade #263

Closed tobiasehlert closed 1 year ago

tobiasehlert commented 1 year ago

There seems to be an issue with the title parsing of characters.

Current response:

{
    "character": {
        "character": {
            "name": "Nocna Furia",
            "sex": "male",
            "title": "Tibia's Topmodel",
            "unlocked_titles": 0,
...

Expected response:

{
    "character": {
        "character": {
            "name": "Nocna Furia",
            "sex": "male",
            "title": "Tibia's Topmodel (Grade 1)",
            "unlocked_titles": 6,
...

URL:

Error from log:

2023/10/08 19:58:30 [warning] TibiaDataStringToInteger: couldn't convert string into int. error: strconv.Atoi: parsing "Grade": invalid syntax
[GIN] 2023/10/08 - 19:58:30 | 200 |  141.134276ms |   XXX.XXX.XXX.XXX | GET      "/v4/character/Nocna Furia"