hypixel-api-ts
v0.0.0
Published
Fork of typed-hypixel-api containing new features.
Downloads
1
Maintainers
Readme
Hypixel TS
Typescript-focused wrapper for the Hypixel API. This library covers 100% of the API (as of 3/23/23), and soon will be able to automatically update.
Usage
Currently, this package is identical to Typed Hypixel API We plan on adding QOL features, such as in-depth request functions & parsers.
Contributing
Any contribution to this project is greatly appreciated. Basic TS & JS knowledge is required. Add JS-Doc comments, if desired. Once complete, run yarn test
to make sure everything functions as needed. This will test each endpoint and compare it to the API.
Adding an endpoint
(Shamelessly stolen from Typed Hypixel API)
Each endpoint is in a separate file in the src/responses/
directory. You can look at other endpoints as a reference on how yours should look. If you add one, first export it from src/responses/index.ts
and then in src/index.ts
add it to the Requests
interface. Also, this isn't necessary but it's recommended that you add JSDoc comments to explain what each field is for. Finally, add a test in test/index.js
and do yarn test
.
Updating an endpoint
If you change an endpoint, simply find the relevant file in the src/responses/
directory and add a new type. Then, run yarn test
to make sure it's correct.
JSDocs
If you update or add a JSDoc (i.e. the /** */ comments), please use proper grammar and add a period at the end of your sentences. The comments should also be easy to understand for someone who does not have deep knowledge of the API. If you don't understand a field or you don't feel like it, you don't have to write anything for it.