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 🙏

© 2026 – Pkg Stats / Ryan Hefner

bser.js

v1.0.0

Published

이터널 리턴 API 래퍼

Readme

bser.js

이터널 리턴 API 래퍼

빠른 시작

bun install bser.js
import {BserClient, Language, MatchingMode, MatchingTeamMode, RegionServerCode} from "bser.js";

const client = new BserClient({apiKey: "your-api-key"});

// 닉네임으로 유저 검색
const user = await client.user.getByNickname("닉네임");

// 최근 게임 기록 (최대 90일)
const games = await client.user.getGames(user.uid);

// 상위 랭커 조회
const top = await client.ranking.getTop(33, MatchingTeamMode.Squad);

// 언어 데이터 다운로드 경로
const {l10Path} = await client.data.getLanguage(Language.Korean);

옵션

| 옵션 | 필수 | 기본값 | 설명 | |-----------|--------|---------|--------------------| | apiKey | 예 | - | API 키 | | timeout | 아니오 | 10000 | 요청 타임아웃 (ms) |

API 구성

| 모듈 | 메서드 | |------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | client.data | getGameDataHash(), getGameData<T>(metaType), getLanguage(language), getWeaponRoutes(routeId?), getWeaponRouteDesc(routeId) | | client.ranking | getTop(seasonId, matchingTeamMode), getTopByServer(seasonId, matchingTeamMode, serverCode) | | client.user | getByNickname(nickname), getGames(uid), getRank(userId, seasonId, matchingTeamMode), getStats(userId, seasonId, matchingMode), getUnionTeam(userId, seasonId) | | client.match | getById(gameId) |

전체 내용은 API 레퍼런스 를 참조하세요.

에러 처리

모든 메서드는 API 응답 code가 200이 아닌 경우 BserApiError 를 throw 합니다:

import {BserApiError} from "bser.js";

try {
    const user = await client.user.getByNickname("존재하지_않는_닉네임");
} catch (e) {
    if (e instanceof BserApiError) {
        console.log(e.code);       // 404
        console.log(e.apiMessage); // "..."
    }
}

| Code | 의미 | |------|--------------------| | 200 | 성공 | | 400 | 파라미터 오류 | | 403 | 금지 / 레이트 리밋 | | 404 | 찾을 수 없음 | | 429 | 요청 과다 | | 500 | 서버 오류 |

테스트

BSER_API_KEY=your-key bun test

통합 테스트는 실제 API 요청을 보내며, data → ranking → user → match 순서로 체인 실행됩니다.

문서