Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hltv

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hltv

The unofficial HLTV Node.js API

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
121
decreased by-29.65%
Maintainers
1
Weekly downloads
 
Created
Source

pyarray logo
The unofficial HLTV Node.js API

Installation

npm install hltv --save

Usage

import HLTV from 'hltv'
// Or if you're stuck with CommonJS
const HLTV = require('hltv')

//create an object before using the API
const hltv = new HLTV()

API

getMatches

Parses all matches from the hltv.org/matches/ page

ParametersTypeDefault Value
None--
hltv.getMatches().then((res) => {
  ...
})

The callback receives an array of objects with the following schema:

PropertyTypeNote
timestringWill be undefined if the match is live or finished
team1string
team1Idstring
team2string
team2Idstring
mapstringOnly exists if the match is BO1
formatstring
labelstringMainly used when the teams are still unknown (e.g. "iBP Masters Grand Final")
idstring
liveboolean
finishedboolean

getLatestResults

Parses all matches from the hltv.org/results/ page

ParametersTypeDefault Value
pagesint1
hltv.getLatestResults(2).then((res) => {
  ...
})

The callback receives an array of objects with the following schema:

PropertyTypeNote
resultstringe.g. '2 - 0' or '16 - 9'
team1string
team1Idstring
team2string
team2Idstring
mapstringOnly exists if the match is BO1
formatstring
idstring

Keywords

FAQs

Package last updated on 11 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc