npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@zikeji/hypixel

v3.1.1

Published

With thorough IntelliSense support & 100% 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 (and an OpenAPI 3.0 schem

Downloads

94

Readme

@zikeji/hypixel

npm Deno npm bundle size visit docs Visit our Discord server. Snyk Vulnerabilities for npm package version Libraries.io dependency status for latest release GitHub license GitHub last commit GitHub code size in bytes GitHub issues Coveralls GitHub Workflow Status

With thorough IntelliSense support & 100% 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 (and an OpenAPI.yaml!), built-in rate-limit handling, flexible cache support, helper functions, and support for undocumented endpoints.

This library aims to replicate the API paths in it's method usage. As such, the general scheme would be to change the path of an API call by simply replacing the / with a ., and if the endpoint takes multiple parameters, those are added on the end. For example, api.hypixel.net/skyblock/profiles?uuid=1234 would simply become client.skyblock.profiles.uuid('1234'). Of course, with everything being fully typed if you are using an IDE that supports IntelliSense you should rarely need to reference documentation.

2.0 to 3.0 Migration

This library follows semver. As backwards incompatible changes were introduced while making this Deno compatible. Most likely nothing you use has changed, and you should be able to update without issue. The only breaking change is that the Client class no longer accepts agent as a parameter, as Deno does not support this.

Installation

NodeJS

Use npm to install this library.

npm i --save @zikeji/hypixel

Deno

As Deno does not require installation, you would simply follow their convention for imports.

import { Client as HypixelClient } from "https://deno.land/x/hypixel/v3.1.0/mod.ts";

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.watchdogstats();
  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.

Otherwise, 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.

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.