Skip to content

gpsanant/theSportsDB

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Aug 18, 2020
Aug 18, 2020
Aug 18, 2020
npm
Aug 20, 2020

theSportsDB

Library for The Sports DB API
For questions, email me at gpsanant@gmail.com

Installation

npm install thesportsdb

Example Usage

const theSportsDB = require('thesportsdb');
(async() => {
    theSportsDB.setApiKey(808) //defaults to 1, set for Patreon
    //works with space, underscores, or "%20"s
    var goat = await theSportsDB.getPlayerByName("michael jordan")
    var kobe = await theSportsDB.getPlayerByName("kobe_bryant") 
    //replace unused parameters with null
    var events = await theSportsDB.getEventsOnDay("2014-10-10", null, "Australian_A-League")
    //ids can be either numbers or strings
    var nextEvents = await theSportsDB.getNext5EventsByTeamId(133602)
})()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published