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

fortnite-replay-downloader

v3.0.6

Published

This module is made to download tournament replays from the Fortnite servers.

Downloads

41

Readme

npm version

Fortnite Replay Downloader

This module is made to download tournament replays from the Fortnite servers.

Features

  • Access token caching
  • Config how many chunks to download
  • Progress callback
  • Get metadata
  • Get download links for chunks

Requirements

Usage

const replayDownloader = require('fortnite-replay-downloader');

replayDownloader.downloadReplay({
  matchId: '09525a55bf724b54b6cae5921f80dcba',
  eventCount: 1000,
  dataCount: 1000,
  checkpointCount: 1000,
  updateCallback: (data) => {
    console.log('');
    console.log('header', `${data.header.current}/${data.header.max}`);
    console.log('data', `${data.dataChunks.current}/${data.dataChunks.max}`);
    console.log('events', `${data.eventChunks.current}/${data.eventChunks.max}`);
    console.log('checkpoints', `${data.checkpointChunks.current}/${data.checkpointChunks.max}`);
  },
}).then((replay) => {
  console.log('Replay downloaded');
}).catch((err) => {
  console.log(err);
});

Methods

downloadReplay(config): promise(buffer)

Config

{
  matchId: string, // the match id to download
  checkpointCount: number, // the amount of checkpoint chunks to download
  maxConcurrentDownloads: number // the amount of chunks downloaded at the same time (default: infinity)
  dataCount: number, // the amount of data chunks to download
  eventCount: number, // the amount of event chunks to download
  updateCallback: (updateData) => {} // gets called after every downloaded chunk with the current progress
}

Update callback structure

{
  header: {
    current: number, // amount of header chunks downloaded (this can only be 0 or 1)
    max: number, // total amount of header chunks (this will always be 1)
  },
  data: {
    current: number, // amount of data chunks downloaded
    max: number, // total amount of data chunks
  },
  events: {
    current: number, // amount of events chunks downloaded
    max: number, // total amount of events chunks
  },
  checkpoints: {
    current: number, // amount of checkpoints chunks downloaded
    max: number, // total amount of checkpoints chunks
  },
}

downloadMetadata(config): promise(result)

{
  matchId: string, // the match id to download
  chunkDownloadLinks: boolean, // gives you download links and file sizes for every chunk
}

Result structure

{
  ReplayName: string, // the replay id
  LengthInMS: number,
  NetworkVersion: number, // the current network version
  Changelist: number, // the current changelist version
  FriendlyName: string, // the replay name. Its just the name of the map
  Timestamp: string,
  bIsLive: boolean, // is the match currently running?
  bCompressed: boolean, // is the replay compressed. Replays are compressed using oodle
  DesiredDelayInSeconds: number,
  DownloadLink: string, // header download link // expires after 15 minutes
  FileSize: number,
  Checkpoints: [
    {
      Id: string, // chunk id
      Group: string, // checkpoint group
      Metadata: string, // checkpoint metadata
      Time1: number, // start time
      Time2: number, // end time
      DownloadLink: string, // expires after 15 minutes
      FileSize: number,
    }
  ],
  Events: [
    {
      Id: string, // chunk id
      Group: string, // event group
      Metadata: string, // event metadata
      Time1: number, // start time
      Time2: number, // end time
      DownloadLink: string, // expires after 15 minutes
      FileSize: number,
    }
  ],
  DataChunks: [
    {
      Id: string, // data id
      Time1: number, // start time
      Time2: number, // end time
      SizeInBytes: number, // uncompressed size
      DownloadLink: string, // expires after 15 minutes
      FileSize: number,
    }
  ],
}