tibiadata-api-go icon indicating copy to clipboard operation
tibiadata-api-go copied to clipboard

Feature: Add link Property for Character from tibia.com Website

Open Skyliife opened this issue 1 year ago • 3 comments

An enhancement to the current character data structure to include a link property that provides the URL to the character's profile on tibia.com. This would be useful for directly accessing the character's profile on the official website.

Proposed Change:

  1. Add a link property to the character object, which should contain the URL to the character's profile on tibia.com.
  2. The URL should replace spaces in the character's name with "+" to match the URL format used by tibia.com. e.g. character Atom Ironman => Atom+Ironman

Example:

The updated structure for the character object should look like this:

"character": {
      "account_status": "string",
      "achievement_points": 0,
      "comment": "string",
      "deletion_date": "string",
      "former_names": [
        "string"
      ],
      "former_worlds": [
        "string"
      ],
      "guild": {
        "name": "string",
        "rank": "string"
      },
      "houses": [
        {
          "houseid": 0,
          "name": "string",
          "paid": "string",
          "town": "string"
        }
      ],
      "last_login": "string",
      "level": 0,
      "married_to": "string",
      "name": "string",
      "position": "string",
      "residence": "string",
      "sex": "string",
      "title": "string",
      "traded": false,
      "unlocked_titles": 0,
      "vocation": "string",
      "world": "string",
      //new link property
      "link": "https://www.tibia.com/community/?name=Trollefar"
    },

Skyliife avatar Aug 14 '24 15:08 Skyliife

hi @Skyliife, thanks for the suggestion, what about having that field in the information section and not mixed into the "data"-parts?

tobiasehlert avatar Aug 22 '24 04:08 tobiasehlert

@tobiasehlert also a good idea we could add guilds and other usefull links as well for example in the guild request?

Skyliife avatar Aug 27 '24 09:08 Skyliife

@tobiasehlert also a good idea we could add guilds and other usefull links as well for example in the guild request?

That would be something that is added on every endpoint the same way.

tobiasehlert avatar Sep 11 '24 11:09 tobiasehlert

hey @tobiasehlert , can I work on this?

Kai-Animator avatar Oct 14 '24 15:10 Kai-Animator

hey @tobiasehlert , can I work on this?

Sure @Kai-Animator, submit a pull request and we can try to get it merged :)

tobiasehlert avatar Oct 14 '24 16:10 tobiasehlert

hey @tobiasehlert , can I work on this?

Sure @Kai-Animator, submit a pull request and we can try to get it merged :)

Awesome :) How would you prefer to see it done? I considered adding link to the Information struct and do only the Character endpoint for now. Otherwise I could be adding the tibia.com links to all the endpoints that require it

Kai-Animator avatar Oct 14 '24 17:10 Kai-Animator