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

(items): Specification for interacting with Mount/Minion lookup #24

Open ReidWeb opened 2 years ago

ReidWeb commented 2 years ago

During the process of fetching a character's mounts or minions we cannot ascertain the item ID or name of the mount/minion directly (see comments on #22 and #23). To do so we need to interact with the DOM of the page, the proposal is to abstract this into a service consumable by the lodestone client.

Use Case

  1. As a consumer of the module I should be able to ascertain the name of mount/minion on a character's profile.
  2. As a consumer of the module I should be able to ascertain the id of a mount/minion on a character's profile

Proposed Solution

In short the "service" will have methods as below:

  1. Lookup character ID's mounts/minions on Lodestone, iterate over DOM, record to DB and return results as set of objects with keys that are, any keys not existing will be persisted to the DB:
    • item id
    • item name
    • item thumbnail url (match against this)
  2. Fetch all presently stored minions as one blob of JSON
  3. Fetch all presently stored mounts as one blob of JSON

There will be a typescript client for interfacing with the above service. At build time, the client should be pre-seeded with 2 JSON files reflecting the current state of the prod database. The client should include a function to interface with these in addition to the above methods.

When utilizing that client the lodestone module should behave as follows during the lodestoneClient.getCharacter(..) method:

Other

Implementation of this will be described in issues in a new repo.


This is a :rocket: Feature Request