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

hypixel-api-typescript

v1.1.0

Published

This package is a wrapper for https://api.hypixel.net written in Typescript.

Downloads

9

Readme

GitHub | NPM

Build Status

This package is a wrapper for https://api.hypixel.net written in Typescript.

All requests are returned as parsed Typescript interfaces and so gone is the time, where you have to constantly check the names of the values you actually need. If there are any values the Interface does not contain, then open a issue or Pullrequest on GitHub. Also a huge shoutout to ethanent from where I forked this repository, so that I have a base to work with.

Installation

npm install --save hypixel-api-typescript

Usage

Import the HypixelAPI and store your Hypixel API-key as a UUID.

import * as HypixelAPI from 'hypixel-api-typescript';

const API_KEY = UUID.fromString("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx")

Getting player information

//by NAME
const playerByName = await HypixelAPI.getPlayerByName("unaussprechlich", API_KEY);

//by UUID
const uuid = UUID.fromShortString("4064d7ecc2124a1cb252ecc0403a2824");
const playerByName = await HypixelAPI.getPlayerByUuid(uuid, API_KEY);

Finding guilds

A GuildID can be found from a member's UUID or name.

//by NAME
const guildIdByMemberName = await HypixelAPI.findGuildIdByPlayerName("unaussprechlich", API_KEY);

//by UUID
const uuid = UUID.fromShortString("4064d7ecc2124a1cb252ecc0403a2824");
const guildIdByMemberUuid = await HypixelAPI.findGuildIdByPlayerUuid(uuid, API_KEY);

With the GuildID you can request the Guild.

const guild = await HypixelAPI.getGuildById(guildIdByMemberUuid, API_KEY);

HypixelAPI can also return the Guild directly.

//by NAME
const guildByMemberName = await HypixelAPI.getGuildByPlayerName("unaussprechlich", API_KEY);

//by UUID
const uuid = UUID.fromShortString("4064d7ecc2124a1cb252ecc0403a2824");
const guildByMemberUuid = await HypixelAPI.getGuildByIPlayerUuid(uuid, API_KEY);

Getting booster information

This does return all active an queued Boosters.

const boosters = await HypixelAPI.getBoosters(API_KEY);

You can also check if Hypixel has paused the Booster queue.

const isQueueStopped = await HypixelAPI.getBoostersIsDecrementing(API_KEY);

Getting the leaderboards

The HypixelAPI can request the leaderboards you find in each Gamelobby.

const leaderboards = await HypixelAPI.getLeaderboards(API_KEY);

Getting informations about your API-key

The HypixelAPI can request the leaderboards you find in each Gamelobby.

const key = await HypixelAPI.getKey(API_KEY);

API Response