Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 6 tasks
ReidWeb opened this issue Dec 5, 2021 · 0 comments
Open
1 of 6 tasks

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

ReidWeb opened this issue Dec 5, 2021 · 0 comments
Assignees
Labels
feature-request New feature or request

Comments

@ReidWeb
Copy link
Member

ReidWeb commented Dec 5, 2021

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:

  • The lodestone client should first attempt to find a match in the map included in the dependency.
  • If local lookup fails to find a match, call to service should be made to fetch the blob.
  • When a call to fetch blob is made, this should be persisted to memory and that in memory blob should replace the file system blob for the duration of eixstence of the client
  • If no match can be found on the blob, a call to lookup that individual character should be made.

Other

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

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant