-
Notifications
You must be signed in to change notification settings - Fork 16
feat: upgrade to v2 #19
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
Conversation
…ality - Consolidated exports in index.ts to simplify module structure. - Updated request function in utils.ts to handle array parameters for query and version options. - Modified sheets.ts and versions.ts to ensure params are passed correctly in API requests. - Expanded test suite in xivapi-js.test.ts to include comprehensive search validation and error handling for various query scenarios.
|
Thank you very much! I'm not at all involved in JS dev these days so this is invaluable help. You can keep going at your leisure and I can review your changes when you have full coverage. As for the TS, I'm not 100% sure. Let's see towards the end of this PR. |
… error handling - Introduced a new class structure for xivapi, encapsulating sheet access methods for achievements, items, and more. - Enhanced error handling with a CustomError class for better debugging. - Updated utils to ensure consistent option handling across API requests. - Expanded test coverage to validate new functionalities and ensure robust error handling.
|
I have made some changes to the README to showcase what it can do now. I am not 100% sure what sheets people would want so I have left it as await xivapi.data.sheets.all();
await xivapi.data.sheets.list("BeastTribe")
await xivapi.data.sheets.get("BeastTribe", 1) // can be a string or number |
…fig.js and update dependencies
…tionality - Introduced a new Sheet class for structured access to sheet data. - Updated XIVAPI class to utilize the new Sheet class for achievements, minions, mounts, and items. - Removed the deprecated Search class and its related functionality. - Enhanced error handling and request parameter management in the utils and sheets modules. - Consolidated exports in index.ts for improved module organization.
|
Let me know if you want me to switch it to javascript, also did you want to continue using commonjs ( |
Nope, considering how major and breaking the overall update is by definition, I think it's fine to make those changes too. Thank you again! |
|
No worries. I just noticed something I forgot to add, pathing to the dist folder. Give me a moment |
Since https://v2.xivapi.com has made some breaking changes to this package, I have gone through and updated the base methods (including typings):
/asset/asset/map/{territory}/{index}/search/sheet/sheet/{sheet}/sheet/{sheet}/{row}/versionMethods relating to lodestone, such as
pvpteamandcharactersare no longers supported (Source: https://v2.xivapi.com/docs/migrate/#lodestone):If you wish for me to continue, please let me know. I can use the methods above to create datasets for
items,achievementsetc if required.P.S. For locally usage, I switched to TS and ESM, if you want me to change this back I can after.