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

erbs-client

v1.7.0

Published

Eternal Return: Black Survival Api Client

Downloads

3

Readme

Known Vulnerabilities codecov

Eternal Return Black Survival Api Client

This is a simple NPM package that serves as a client wrapper around the official Eternal Return: Black Survival api, see the official documentation for more information

Environment Configuration

  • API_KEY = The Api Key provided to you by the official API
  • API_VER = defaults to 1

It is suggested the above environment variables get configured through a package such as the dotenv package or through your favorite way to set environment variable. These two can alternatively be set in the constructor for the client.

Monorepo

This project is housed inside of a monorepo that contains my other ERBS work, monorepo stuff is using lerna

Features

  • First Class Typescript Support
  • Wrappers for all current official methods
  • Masteries, MetaData, and GameMode helpers
  • Additional helper methods for pulling specific data from the api

Exports

Usage

import { ErBsClient, GameModes } from 'erbs-client';

const client = new ErBsClient('my-key', 'v1');

const sampleMethods = [
  client.getPlayerNumber('myPlayerName'), // Search for a player number using the given player name
  client.getCharacters(), // Merges multiple metadata calls to return all stats for all characters, no parameters
  client.getTopPlayers(1, GameModes.Duos), // gets all top players for a given season and game mode
  client.getTopSolos(), // shorthand for getTopPlayers(#, GameModes.Solos), same exists for squads and duos
  client.getRankForPlayer(123456, 1, GameModes.Squads), // gets the rank of the selected player for the given season and mode
  client.getGamesForPlayer(123456), // gets all games for the given player (pagination WIP)
  client.getPlayerRecord(123456, 0) // gets all records for the given player for a given season
];

const results = await Promise.all(methods);

Docs:

Check the typedocs above for more information or go through all the generated markdown here

Globals