Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Library - API V1] Javascript Library - theSportsDB (gpsanant)
#1
Javascript Library to connect to the api of https://thesportsdb.com/ 

Download: Github: https://github.com/gpsanant/theSportsDB
Developer: Gautham Anant
Github Profile: https://github.com/gpsanant
Contact: gpsanant@gmail.com

Example usage:
Code:
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)
})()
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)