0.0.8 • Published 3 years ago

steam-miniprofile v0.0.8

Weekly downloads
16
License
MIT
Repository
github
Last release
3 years ago

node-steam-miniprofile

Table of Contents

Introduction

A module to fetch Steam miniprofile data on any Steam user. This wraps around the https://steamcommunity.com/miniprofile/<ACCOUNTID>/json endpoint.

Getting Started

You can download this from npm using the following command.

npm install steam-miniprofile
Usage

This module exports two functions, getMiniprofile and getMiniprofileByID64 which both return a Promise that resolves to a Miniprofile.

Example
const accountid = "120816906";
const steamid64 = "76561198081082634";
...
const miniprofile = await getMiniprofile(accountid);
console.log(miniprofile.level);
...
const { level, ... } = await getMiniprofileByID64(steamid64);
console.log(level);
...
Types

The interface Miniprofile can be found below.

interface MiniProfile {
    level: number;
    level_class: string; // Determines badge
    avatar_url: string; // Full image url
    persona_name: string; // Current display name

    favorite_badge?: {
        name: string;
        xp: string;
        level: number;
        description: string;
        icon: string;
    },
    profile_background?: {
        "video/webm": string;
        "video/mp4": string;
        image: string; 
    },
    avatar_frame?: string;
}
0.0.8

3 years ago

0.0.7

3 years ago

0.0.3

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.6

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago