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

util: new XIVAPI CLI query tool #41

Merged
merged 5 commits into from
Jan 11, 2024
Merged

util: new XIVAPI CLI query tool #41

merged 5 commits into from
Jan 11, 2024

Conversation

wexxlee
Copy link
Collaborator

@wexxlee wexxlee commented Jan 7, 2024

Adds a new XIVAPI CLI query tool to util. It's a lightweight script that fetches endpoint data, filters it based on a user-specified filter string, and outputs it as JSON to the console. I put an early version of this together for looking into some of the data issues during the util script cleanup, and it was pretty helpful. It's grown a bit since. 👀

More info on usage available by running npm run query -- -h.

Since it uses regex on user-supplied inputs, there's a lot of error handling needed to capture wonky user input. I think I've accounted for most of the possibilities, but open to anything I missed.

Comments/suggestions welcome!

@github-actions github-actions bot added docs /docs, /screenshots, *.md util /util labels Jan 7, 2024
util/query_xivapi.ts Outdated Show resolved Hide resolved
util/query_xivapi.ts Show resolved Hide resolved
util/xivapi.ts Show resolved Hide resolved
Copy link
Collaborator

@valarnin valarnin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this for now. Feel free to merge at your convenience, depending on thoughts on comments for the regexes above.

@wexxlee wexxlee merged commit 066107d into OverlayPlugin:main Jan 11, 2024
10 checks passed
@wexxlee wexxlee deleted the xivapi-cli branch January 11, 2024 01:19
github-actions bot pushed a commit that referenced this pull request Jan 11, 2024
Adds a new XIVAPI CLI query tool to util. It's a lightweight script that
fetches endpoint data, filters it based on a user-specified filter
string, and outputs it as JSON to the console. I put an early version of
this together for looking into some of the data issues during the util
script cleanup, and it was pretty helpful. It's grown a bit since. 👀

More info on usage available by running `npm run query -- -h`.

Since it uses regex on user-supplied inputs, there's a lot of error
handling needed to capture wonky user input. I *think* I've accounted
for most of the possibilities, but open to anything I missed.

Comments/suggestions welcome! 066107d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs /docs, /screenshots, *.md util /util
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants