Skip to content
forked from dajk/hltv-api

An unofficial JSON api for popular CS:GO website hltv.org, npm link:

Notifications You must be signed in to change notification settings

crownloyal/hltv-api

 
 

Repository files navigation

HLTV API

Build Status npm Codecov dependencies Status devDependencies Status

This is my experimental project, but also small useful module for node.js which helps you to easy implement data from popular CS:GO website hltv.org.

Installation

$ npm install hltv-api

Methods

  1. getNews
  2. getResults

How to use

  • import methods we are going to use
import {
  getNews,
  getResults,
} from 'hltv-api';
News
  • request
getNews(news => console.log(news));
  • response
[{
  "title": "ESL Pro League Season 5 Finals preview",
  "description": "The next big offline event, the ESL Pro League Season 5 Finals, is kicking off tomorrow, May 30, with the round-robin group stage. We have put together a preview where we delve into each of the 12 teams taking part in the $750,000 tournament.",
  "link": "https://www.hltv.org/news/20567/esl-pro-league-season-5-finals-preview",
  "date": "Mon, 29 May 2017 23:27:00 GMT"
}, ]
Results
  • request
getResults(results => console.log(results));
  • response
[{
  "event": "ECS Season 4 Europe",
  "maps": "trn",
  "team1": {
    "name": "fnatic",
    "crest": "https://static.hltv.org/images/team/logo/4991",
    "result": 13
  },
  "team2": {
    "name": "FaZe",
    "crest": "https://static.hltv.org/images/team/logo/6667",
    "result": 16
  },
  "matchId": "/matches/2316387/fnatic-vs-faze-ecs-season-4-europe"
}, ]

About

An unofficial JSON api for popular CS:GO website hltv.org, npm link:

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%