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

overtrack.js

v0.3.2-alpha

Published

A node wrapper for OverTrack

Downloads

3

Readme

OverTrack.js

npm GitHub issues

Installing

NOTE

Node 8.x is required

npm install --save overtrack.js

Example

const ot = require('overtrack.js')

ot.player('eeveea')
  .then((games) => console.log(games))
  .catch(console.error)
NOTE

I plan on writing better docs before release.

Methods

NOTE

All methods return Promises

ot.player(key) ot.sr(key[, options]) ot.clientVersion() ot.lastMatch(key)

ot.player(key)

Returns: Simple game object.
Example:
ot.player('eeveea')
  .then((games) => {
    const game = games[0]
    console.log('Simple game object:', game)
    return game.detailed()
  })
  .then((game) => console.log('Detailed game object:', game))
  .catch(console.error)

ot.sr(key[, options])

options
  • multipleAccounts: Boolean Default: false
Returns: Number or Array
  [
    { name: String, sr: Number },
    {...}
  ]
Example:
ot.sr('eeveea')
  .then((sr) => console.log(sr))
  .catch(console.error)

ot.sr('eeveea', { multipleAccounts: true })
  .then((accounts) => {
    const message = accounts
      .map((x) => `${x.name}: ${x.sr}`)
      .join('\n')
    console.log(message)
  })
  .catch(console.error)

ot.clientVersion()

Returns: Object
{
  message: String,
  number: String
}
Example:
ot.clientVersion()
  .then((version) => console.log(version.message))
  .catch(console.error)

ot.lastMatch(key)

NOTE

Some fields may be null.

~~Returns: Simple game object.~~
Example:
ot.lastMatch('eeveea')
  .then((game) => {
    console.log('Last match:', game)
    return game.detailed()
  })
  .then((game) => console.log('Detailed game object:', game))
  .catch(console.error)

Objects

simple

detailed

heroStatistics

{
  elims: Number,
  damage: Number,
  objectiveKills: Number,
  healing: Number,
  objectiveTime: Number,
  deaths: Number,
  tabHealth: Number,
  timePlayed: Number,
  specific: [
    { value: Number, name: String },
    {...}
  ]
}

heroesPlayed

[
  { hero: String, percent: Number },
  {...}
]

killfeed

NOTE

There are two different types of objects in the array kills, and resurrects.

  [
    {
      left: {
        hero: String,
        player: String,
        team: 'blue' || 'red'
      },
      resurrect: true,
      right: {
        hero: String,
        player: String,
        team: 'blue' || 'red'
      },
      timestamp: Number
    },
    {
      assisters: [
        String
      ],
      killicon: {
        hero: String,
        ability: String
      },
      left: {
        hero: String,
        player: String,
        team: 'blue' || 'red'
      },
      resurrect: false,
      right: {
        hero: String,
        player: String,
        team: 'blue' || 'red'
      },
      timestamp: Number
    },
    {...}
  ]

map

{
  name: String,
  type: String
}

misc

  customGame: Boolean || null,
  key: String || null,
  url: String|| null,
  userId: Number || null,
  user: String || null,
  player: String || null,
  json: String || null,
  viewable: Boolean || null

objectiveStages

This has not been parsed yet and is the raw info form overtarck api

result

{
  blue: {
    score: Number,
    outcome: String
  },
  red: {
    score: Number,
    outcome: String
  }
}

season

{
  name: String,
  number: Number,
  offSeason: Boolean
}

sr

{
  diff: Number,
  end: Number || null,
  name: String,
  start: Number || null
}

teams

{
  blue: {
    sr: Number,
    players: [
      { name: String, rank: String },
      {...}
    ]
  },
  red: {
    sr: Number,
    players: [
      { name: String, rank: String },
      {...}
    ]
  }
}

time

{
  start: Number,
  end: Number || null,
  length: Number
}

Development

Pull requests are welcome.

Linter

JavaScript Standard Style