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 minions #23

Open ReidWeb opened 2 years ago

ReidWeb commented 2 years ago

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

These minions 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 minions 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 minions 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 minions. (Disabled)
  4. As a consumer of the lodestone module I should be able to ask it to fetch a character's minions (either as IDs or expanded names) without fetching the whole character.

Proposed Solution

Other

No modifications to Character.fromPage are required.

Possibility to resuse code from mount fetching here, they're very similar.


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 minion without interacting with the DOM.

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

Minion 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/9e/9ed9a88950ba83a052d6f7c32efe5bd89530bac7.png?n6.0

ReidWeb commented 2 years ago