XIVStats / lodestone

A module for interfacing with the Final Fantasy XIV Lodestone, and returning entity (character, server etc.) information.
MIT License
0 stars 0 forks source link

(character): Add support for fetching mounts #22

Open ReidWeb opened 2 years ago

ReidWeb commented 2 years ago

The ability to fetch the set of mounts a character has is required.

These mounts are presently contained on a sub-page on the lodestone so require a second GET, to fetch.

Use Case

  1. As a consumer of the lodestone module I should be able to ask it to fetch a character, and return the ids of all the mounts they have. (Default)
  2. As a consumer of the lodestone module I should be able to ask it to fetch a character, and return the names of all the mounts they have. (Expand)
  3. As a consumer of the lodestone module I should be able to ask it to fetch a character but specify not to fetch mounts. (Disabled)
  4. As a consumer of the lodestone module I should be able to ask it to fetch a character's mounts (either as IDs or expanded names) without fetching the whole character.

Proposed Solution

Other

No modifications to Character.fromPage are required.


This is a :rocket: Feature Request

ReidWeb commented 2 years ago

From investigation there does not appear to be a way to fetch the item id of a mount without interacting with the DOM.

Image URLs are consistent between characters, so we may have to build up a database of those.

Mount names are not presented on the DOM without interaction either the only accessible attribute that is available is image urls such as https://img.finalfantasyxiv.com/lds/pc/global/images/itemicon/64/643539e02f8fd892a12cc1c93222a594a1bc9f5d.png?n6.0

ReidWeb commented 2 years ago