Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@zikeji/hypixel

zikeji126MIT4.1.4TypeScript support: included

With IntelliSense support & test coverage, this is an unopinionated async/await API wrapper for Hypixel's Public API. It is developed in TypeScript complete with documentation, typed interfaces for all API responses, built-in rate-limit handling, flexible

api, api-wrapper, hypixel, skyblock, minecraft, hypixel skyblock, minecraft hypixel, hypixel minecraft, hypixel minecraft skyblock, hypixel api, skyblock api, minecraft api

readme

@zikeji/hypixel

npm npm bundle size visit docs GitHub license GitHub last commit GitHub code size in bytes GitHub issues Coveralls GitHub Workflow Status

With IntelliSense support, this is an unopinionated async/await API wrapper for Hypixel's Public API. It is developed in TypeScript complete with documentation, typed interfaces for all API responses, built-in rate-limit handling, flexible cache support, and some helper functions.

4.0.0 Information

4.0 is a major breaking version, where I've rebased types on the v2 endpoints published by Hypixel and removed my previous OpenAPI.yaml.

I've added AugmentedTypes.ts to "augment" their typings, but they are very barebones in the current state. Pull requests augmenting types are welcome, I will more than likely not be exploring the typings like I did in the past, and merely add what I want/need.

Installation

NodeJS

Use npm to install this library.

npm i --save @zikeji/hypixel

Usage

const { Client } = require("@zikeji/hypixel");
const client = new Client("API_KEY");
(async () => {
  const status = await client.status.uuid("20934ef9488c465180a78f861586b4cf"); // Minikloon
  console.log(status);
  // {"online": false}
  const stats = await client.punishmentstats();
  console.log(stats);
  // {watchdog_lastMinute: 1, staff_rollingDaily: 2609, watchdog_total: 5591714, watchdog_rollingDaily: 4213, …}
})();

Helpers

This library adds multiple helpers to facilitate using the Hypixel API. You can find documentation on each helper here. If you would like to request a helper that doesn't exist, please open an issue. Otherwise if you would like to contribute one refer to the below section.

Contributing

If some API result isn't documented / typed out fully, please open an issue and I can see about adding it. However some data is too exhaustive to provide typings to in a reasonable manner, as exhibited here, where it isn't reasonable to add 19.5 thousand lines of code to document the entire dataset.

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. All changes must ensure they pass eslint, tests, and that testing is updated to meet or exceed the previous coverage.

New Typings

If Hypixel updates their API documentation, you can navigate to https://api.hypixel.net and click "Download", place it in the root folder of this project, and do npm run types:openapi to regenerate the ./src/types/api.ts.

Licenses

This projected is licensed under the MIT license. For additional details see LICENSE.

This library contains derivative work based on classes from the hypixel-php library. Code that is derivative work of hypixel-php will be marked as such with a header comment. See LICENSE-HYPIXEL-PHP.md for additional details on the original license.

changelog

Changelog

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

4.1.4 (2024-12-02)

Documentation

  • issue template: add template for reporting missing type completion (5fddda0)

4.1.3 (2024-09-17)

Bug Fixes

  • override SkyBlockAuction component to ensure consistent typing (a99c061)

4.1.2 (2024-09-17)

Bug Fixes

  • add bin to auction type (63f2e52)

4.1.1 (2024-09-16)

Bug Fixes

  • properly type hint the nature of values being undefined in the event a player has never touched Hypixel (569d245)
  • return an empty result properly (be12a07)

4.1.0 (2024-09-16)

Features

  • add augmented skyblock profiles endpoint typings (6ad6c41)
  • add guild type augment (47e15d8)
  • augment election endpoint (d3ee25f)
  • augmented types for the /v2/player endpoint (45075da)
  • more augmented types, some clean up (282d0cf)
  • move augment files for better organization (2435dd6)

Bug Fixes

  • regression from removing the record augment (962801d)
  • type resolution errors (1a57979)

Miscellaneous Chores

  • bump typescript version to latest (bf519fc)
  • more dependency updates (with an override!) (7f94df9)

Tests

  • update helper type resolution (1e2fc01)

Documentation

  • add category to client methods (90a7373)

4.0.2 (2024-09-11)

Bug Fixes

4.0.1 (2024-09-11)

Bug Fixes

4.0.0 (2024-09-11)

⚠ BREAKING CHANGES

  • prepare 4.0.0 release

Features

Bug Fixes

Code Refactoring

Documentation

  • update documentation generation (d2e4b8a)

Tests

3.1.1 (2021-03-30)

Bug Fixes

Miscellaneous Chores

  • deps: update dependencies (5400617)
  • deps docs: bump typedoc plugin (1f65240)
  • deps docs: update documentation deps and update styles to fix issues (34988f2)
  • docs: update CI action (f737eda)

3.1.0 (2021-03-22)

Features

  • add deno example, add semantic release command to change README.md (8027a8e)

Documentation

  • README: add /mod.ts to docs for Deno (357e760)

Miscellaneous Chores

  • deps: update dependencies (28eb3b3)

3.0.3 (2021-03-22)

Bug Fixes

  • ci: change token to env (9251406)
  • ci: push after removing the deno_dist files (b81a280)
  • ci: use API directly (5f96489)

3.0.2 (2021-03-22)

Bug Fixes

  • ci: use dispatch, fix missing backtick (dad1989)

Tests

  • helpers: migrate more deno tests (1e144bd)

3.0.1 (2021-03-22)

Bug Fixes

3.0.0 (2021-03-22)

⚠ BREAKING CHANGES

  • separate request portion of client and add denoify port

Features

  • add denoify in prep to properly add Deno support (3315eb4)
  • add NBT deno port for TransformItemData (610aa32)
  • ignore bulky files in distribution (ecbb545)
  • separate request portion of client and add denoify port (687acb0)
  • update release workflow (72265c2)

Bug Fixes

  • add try/catch to solve issue with nbt_parser (08228b7)
  • commit deno test files (389dcad)
  • fix incorrect merge causing issues (70ba731)

Miscellaneous Chores

  • deps: update prismarine-nbt dev dependency (6301739)

Tests

  • coverage: ignore deno ports for coverage (7a16dda)
  • fix: remove unused import (298bf98)
  • refer to previous (50e1509)
  • remove globals.d.ts from test files (8ce8a07)

Documentation

  • restore changelog (93efe02)
  • helpers: update minecraft item data docs for deno (8fda927)
  • helpers: update prismarine nbt line (fb0535d)

2.2.3 (2021-03-19)

Bug Fixes

  • deno: rework imports and change stuff around to get Deno working (7d2e016)

2.2.2 (2021-03-19)

Bug Fixes

  • deno: add deno-types comments (cd97322)

2.2.1 (2021-03-19)

Bug Fixes

  • deno: add mod.ts for deno (3a024f0)
  • deno: export all with extension in mod.ts for correct resolution (16b6839)

2.2.0 (2021-03-19)

Features

  • helpers: add SkyWars helpers for level and prestige (15be627), closes #203

Documentation

  • helpers: add SkyWars helpers documentation (ed80716)
  • fix typo in bedwars info (db7ab77)
  • optimize webp examples (37abc23)

2.1.2 (2021-03-19)

Miscellaneous Chores

Documentation

2.1.1 (2021-01-12)

Miscellaneous Chores

  • semantic-releases: add new releaseRules (b726ef8)

Documentation

  • readme: add Discord link to README (0c583aa)
  • vuepress: add Discord link to navigation bar of documentation site (51d1abb)

2.1.0 (2021-01-12)

Features

  • docs: add algolia docsearch (3bf266a)

2.0.1 (2021-01-09)

Bug Fixes

  • docs: don't include files, only a single entry point (e734f75)

Documentation

  • readme: add some more information to readme (685daf1)
  • readme: update general information in readme header (49d2227)
  • add category for new helpers (ca4c2d3)
  • add more documentation to methods (a42eeff)
  • include full reflection in navbar title (cbd42e8)
  • remove no-inherit plugin (ce0faba)
  • remove theme as it was removed in latest release (8ba4e4b)
  • update broken links (8a2da51)
  • update to newer plugin options for cleaner output (85f8333)

Miscellaneous Chores

  • deps: update out of date dependencies, resolve migration changes in vuepress-theme-mrhope (ca71397)

2.0.0 (2021-01-08)

⚠ BREAKING CHANGES

  • issue with typedoc generation vuepress build

Bug Fixes

  • issue with typedoc generation vuepress build (17e37c3)

Documentation

  • dev: resolve issue rebuilding in a saturated environment (bb7fe85)

1.20.0 (2021-01-08)

Features

  • helpers: add SkyBlock skills helper (2ec2d34)

Documentation

  • helpers: add documentation for the profile skills helper (b5427d9)
  • readme: remove 2.0 mention (5f24c6b)
  • typedoc: resolve issue with ts api docs missing (4d2dd71)
  • vuepress: remove erroneous console.log statement (2926b8c)
  • vuepress: update all urls to point to new ts-api links (7beecf8)

Miscellaneous Chores

  • deps: update a few documentation related dependencies (58409f0)
  • deps: update dts generator and update processing to account for changes (05cef05)

1.19.0 (2021-01-04)

Features

  • api: add /skyblock/auctions_ended endpoint (1b8a4f6)

Bug Fixes

  • deps: duplicate line (f0359c1)
  • docs: fix issue with newer typedoc not generating properly (9ad8e8f)

Documentation

  • helpers: add information on using the item data helper for auctions (2fb1ece)

Miscellaneous Chores

  • dependencies: update prismarine, and typings (524ba52)

1.18.0 (2020-12-08)

Features

  • tests: add tests for collections helper (01a37aa)
  • add skyblock collections helper (55d0efb)
  • api: build out Guild schema more (2e9c09a)
  • helpers: add guild level helper (2bed9c3)

Bug Fixes

  • client: fix reset date in limited event (1874bbc)
  • docs: resolve error generating TS documentation (9b9ab7d)
  • docs: update navbar style to reflect vuepress theme update changes (6d723b4)
  • lint: fixed lint errors from newer lint preset (6afa7e5)

Tests

  • update helpers test to reflect name change (ed11e26)

Documentation

  • helpers: add documentation for profile collections helper (ad637f5)
  • readme: add helpers excerpt (99d4648)
  • add frontmatter category and tags (0a528f1)
  • update last-updated date to be more readable (3beb18e)
  • changelog: update pages.js to rebuild changelog with better formatting (6469178)
  • add more notes to helpers (f3f733f)
  • helpers: add guild level documentation (6e3a977)
  • helpers: fix typo on network-level doc (cb3309b)
  • readme: add 2.0 description to readme (8c46629)

1.17.0 (2020-11-17)

Features

  • api: completely explore and type out /player endpoint and update testing to validate (9e674bd)
  • api: expand typing to the player.stats.Bedwars object (4a469af)
  • api: update player schema to include more social links (2d43066)
  • helpers: add Bedwars helper for level / prestige info (485c010)
  • helpers: add NetworkLevel helper and add licensing information for the work (21e2342)
  • helpers: revise skyblock item data into minecraft item data and added usage example for pit (398f3a9)

Bug Fixes

  • helpers: add rank and plus color as they are separate (c61aba0)
  • package: removed redundant line (f21ef7f)

Code Refactoring

  • helpers: remove NonNullable due to earlier changes making it redundant (648e476)

Documentation

  • helpers: add description for network level helper. (e1508a7)
  • helpers: add documentation for Bedwars helper (90f0408)
  • helpers: add documentation for network level (c9f2cdd)

Tests

  • helpers: add bedwarslevelinfo test and trim fat (2883d57)

1.16.0 (2020-11-14)

Features

  • helpers: add NBT data transformation (42f2325)

Bug Fixes

  • test: fix compilation issue for running coverage (8fbf1b6)

Code Refactoring

  • helpers: moved current helpers into dedicated folder (1893a68)

Tests

  • coverage: bring coverage back to 100% (ce895d4)
  • nbt: add tests for transforming item data to ensure they match schema (885f3d6)

Documentation

  • helpers: add documentation and examples for item data helper (015f724)

1.15.0 (2020-11-12)

Features

  • api: removed rate limit and key on /skyblock/auctions and /skyblock/bazaar (e3a882f)
  • client: add optional cache support to client (7bbeb13)

Bug Fixes

  • client: ocassionally age is undefined when cache hit on CF (894e33a)

Code Refactoring

  • client: no longer extend EventEmitter to get cleaner type suggestions (fd2e5e5)

Documentation

  • client: add more documentation to the client (278cf37)
  • guide: add cache guide (236f110)
  • readme: update README (1356d43)

1.14.0 (2020-11-11)

Features

  • helpers: add hypixel rank helper (98b6fbf)

1.13.0 (2020-11-10)

Features

  • api: add /skyblock/auctions and /skyblock/auction endpoint (9349037)
  • api: add /skyblock/bazaar endpoint (8ffe9a5)
  • api: add /skyblock/profile and /skyblock/profiles endpoint (4c6285a)
  • api: update skyblock profile schema (9b84460)
  • schema: add headers to schema (45ba69f)

Documentation

  • readme: update progress in readme (6c598d0)

1.12.0 (2020-11-08)

Features

  • api: add /resources/achievements endpoint (d648dc8)
  • api: add /resources/challenges endpoint (731895d)
  • api: add /resources/guilds/achievements and /resources/guilds/permissions endpoint (015adf4)
  • api: add /resources/quests endpoint (ae40ec4)

Bug Fixes

  • extra "example" key in schema (5166bc9)

1.11.0 (2020-11-07)

Features

  • api: add /findGuild endpoint (2539022)
  • api: add /friends endpoint (04b1a9e)
  • api: add /key endpoint (7c3b0f7)
  • api: add /player endpoint (b6dd8b9)
  • api: add boosters endpoint (a78baf6)
  • api: add guild endpoint (66ff480)
  • api: add leaderboards endpoint (f0917c5)
  • api: add player count and game counts endpoints (44bf47a)
  • api: add recentGames endpoint (9424309)
  • error handling: add GenericHTTPError to cover the rest of Hypixel's error types & increase code coverage to 100% (02c92e1)

Documentation

  • readme: update progress in readme (4b7f29c)

1.10.0 (2020-10-20)

Features

  • meta: add new unenumerable meta field to results for meta information (4357a7a)
  • meta: add ratelimit to meta (3de2b7f)

Bug Fixes

  • type: resultarray returns appropriate array type (d8ae79e)

Tests

  • improve coverage, test new meta (2933f04)
  • skyblock news: add more assertions for news test (791b02e)

Documentation

  • guide: begin fleshing out guide (be6ac06)
  • vuepress: extract additionalpages to new plugin and adjust changelog sidebar headers (41728e6)

1.9.1 (2020-10-19)

Bug Fixes

  • ci: run test on everything so CI updates properly (169ba06)

Documentation

  • add more logging and second build to see if pesky ts-api wants to work (c7a2c16)
  • readme: update usage example (606a46c)

1.9.0 (2020-10-19)

Features

  • api: add skyblock skills resource endpoint (9ee0d8a)

Bug Fixes

  • ci: main not master (a4b4c4d)
  • docs: fix sidebar warning (ff4e61c)
  • docs: refresh addthis on reload (fee1619)

Documentation

  • readme: update readme usage example (8a0ef8b)
  • add AddThis support (11545ca)

1.8.1 (2020-10-19)

Bug Fixes

  • docs: checkout master and use node_env (cad343e)

Documentation

  • api: persist authorization (c3fffd2)

1.8.0 (2020-10-19)

Features

  • api: add /status endpoint (29be746)
  • docs: add support for code blocks in descriptions (e8025eb)
  • docs: revamp the schema display styles (0aa2ab7)
  • docs: use webpack to load openapi yaml schema (33bc537)

Bug Fixes

  • ci: type in nyc command for ci coverage (9beee2e)
  • cross-env: use a ci script (8f1b4e1)
  • docs: fix issues causing docs:build to fail (59f0f37)

Documentation

  • api: style authorization dialog (8554eca)
  • config: add to watched files (2d9283a)
  • openapi: add usage examples (77b6d6c)
  • readme: update to include project readme instead of custom readme for /, fix some styling (6f162c0)
  • swagger: change expand depth (44992cb)

1.7.0 (2020-10-19)

Features

Reverts

  • ci: revert runs-on as it did not solve the issue (4022c2c)

Code Refactoring

  • client: Refactor client to closely match the methods of the API. (66854f4)

Documentation

  • readme: update readme (6ce65d7)
  • readme: update roadmap (71df72a)
  • readme: update roadmap (61e774d)
  • vuepress: disable cache for local dev (baea275)

Miscellaneous Chores

  • dependencies: update dependencies (e257e22)
  • dependencies: update them once again (7b9bbae)

1.6.0 (2020-10-18)

Features

  • docs: add Swagger client with some styling (7ef6f72)

Bug Fixes

  • include all in dist folder (afa5044)

1.5.2 (2020-10-18)

Bug Fixes

  • ci: add logging to action in attempt to troubleshoot missing information (c877fa4)

Documentation

  • meta: add social, add embed metadata (858895a)
  • readme: point to coveralls (1d30fe2)

1.5.1 (2020-10-18)

Bug Fixes

  • docs: properly escape hero text (d3f789d)
  • publishing: add publishconfig and explicit private (2fd4380)

Documentation

1.5.0 (2020-10-18)

Features

  • rebrand: again, rebrand, to an available package name (6b2fe6a)

Bug Fixes

  • typo: type in package.json (34fa9f0)

Miscellaneous Chores

  • lock: update package-lock (bcfc0db)

1.4.0 (2020-10-18)

Features

  • collections: add collections resource (786f524)
  • rebrand: rebrand to hypixelapi (ca3dc87)

1.3.0 (2020-10-17)

Features

  • openapi: begin implementation of OpenAPI 3.0 spec (98dc4eb)

Documentation

  • readme: update shield (756e78f)
  • vuepress: rename typedoc generated content to ts-api (f56e9b3)

1.2.0 (2020-10-17)

Features

  • docs: add new documentation using vuepress (d9a1661)

Tests

  • queue: fix reset data issue (54ed1fd)

Code Refactoring

  • HypixelSkyblock to "Client". Add base index to re-export all for usage on NPM. (99401bb)

Documentation

  • readme: update readme (66b9c86)
  • more documentation for the profile interface (dab4a98)
  • more documentation tweaks, including namespacing (4de57ee)

1.1.0 (2020-10-12)

Features

  • ratelimit: add rate limit queue (707a342)

1.0.0 (2020-10-11)

Features

Bug Fixes

  • actions: add environment variable (773b7a1)
  • actions: drop support for node 8.0 (b8440f4)
  • ci: note to self: build before running tests (c70da5a)
  • semantic-release: use main branch (81276b0)

Documentation

  • readme: add another badge - shiny (9236b32)
  • readme: update readme & package (ddce35d)