sportmonks-typescript-sdk
v0.1.0
Published
Client for SportMonks
Downloads
1
Maintainers
Readme
[email protected]
Surpass the competition with superior sports data
Installing
npm
npm install sportmonks-typescript-sdk --save
yarn
yarn add sportmonks-typescript-sdk
Important note: this library can be used in both the client-side or server-side, but using it in client-side browser code is not recommended as you would expose security credentials.
Getting Started
import { Sportmonks } from "sportmonks-typescript-sdk";
const sportmonks = new Sportmonks({
// Defining the base path is optional and defaults to https://api.sportmonks.com
// basePath: "https://api.sportmonks.com",
version: "v3",
sport: "football",
apiKey: "API_KEY",
});
const allResponse = await sportmonks.cities.all({});
console.log(allResponse);
Documentation for API Endpoints
All URIs are relative to https://api.sportmonks.com
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- CitiesApi | all | GET /{version}/core/cities | All CitiesApi | getById | GET /{version}/core/cities/{cityId} | By ID CitiesApi | search | GET /{version}/core/cities/search/{name} | Search ContinentsApi | all | GET /{version}/core/continents | All ContinentsApi | getById | GET /{version}/core/continents/{continentId} | By ID CountriesApi | all | GET /{version}/core/countries | All CountriesApi | getById | GET /{version}/core/countries/{countryId} | By ID CountriesApi | search | GET /{version}/core/countries/search/{name} | Search MyApi | enrichments | GET /{version}/my/enrichments | All MyApi | leagues | GET /{version}/my/leagues | All MyApi | resources | GET /{version}/my/resources | All OddsApi | bookmakerById | GET /{version}/odds/bookmakers/{bookmakerId} | By ID OddsApi | bookmakersAll | GET /{version}/odds/bookmakers | All OddsApi | bookmakersByFixtureId | GET /{version}/odds/bookmakers/fixtures/{fixtureId} | By Fixture ID OddsApi | bookmakersMappingByFixtureId | GET /{version}/odds/bookmakers/fixtures/{fixtureId}/mapping | Mapping by Fixture ID OddsApi | bookmakersSearch | GET /{version}/odds/bookmakers/search/{name} | Search OddsApi | fixturesUpcomingByMarketId | GET /{version}/{sport}/fixtures/upcoming/markets/{marketId} | Upcoming Fixtures by Market ID OddsApi | marketById | GET /{version}/odds/markets/{marketId} | By ID OddsApi | marketsAll | GET /{version}/odds/markets | All OddsApi | marketsSearch | GET /{version}/odds/markets/search/{name} | Search RegionsApi | all | GET /{version}/core/regions | All RegionsApi | getById | GET /{version}/core/regions/{regionId} | By ID RegionsApi | search | GET /{version}/core/regions/search/{name} | Search SportApi | coachById | GET /{version}/{sport}/coaches/{coachId} | By ID SportApi | coachesAll | GET /{version}/{sport}/coaches | All SportApi | coachesByCountryId | GET /{version}/{sport}/coaches/countries/{countryId} | By Country ID SportApi | coachesLatest | GET /{version}/{sport}/coaches/latest | Last updated SportApi | coachesSearch | GET /{version}/{sport}/coaches/search/{name} | Search SportApi | commentariesAll | GET /{version}/{sport}/commentaries | All SportApi | commentariesByFixtureId | GET /{version}/{sport}/commentaries/fixtures/{fixtureId} | By Fixture ID SportApi | fixtureByDateRangeForTeam | GET /{version}/{sport}/fixtures/between/{startDate}/{endDate}/{teamId} | By Date Range for Team SportApi | fixtureById | GET /{version}/{sport}/fixtures/{fixtureId} | Fixture ID SportApi | fixturesAll | GET /{version}/{sport}/fixtures | All SportApi | fixturesByDate | GET /{version}/{sport}/fixtures/date/{date} | By Date SportApi | fixturesByDateRange | GET /{version}/{sport}/fixtures/between/{startDate}/{endDate} | By Date Range SportApi | fixturesByIds | GET /{version}/{sport}/fixtures/multi/{fixtureIds} | By IDs SportApi | fixturesHeadToHead | GET /{version}/{sport}/fixtures/head-to-head/{firstTeam}/{secondTeam} | Head to Head SportApi | fixturesLatest | GET /{version}/{sport}/fixtures/latest | Last Updated SportApi | fixturesSearch | GET /{version}/{sport}/fixtures/search/{name} | Search SportApi | leagueById | GET /{version}/{sport}/leagues/{leagueId} | By ID SportApi | leagueEnrichments | GET /{version}/{sport}/leagues/{leagueId}/includes | Enrichments SportApi | leagueShirts | GET /{version}/{sport}/leagues/{leagueId}/jerseys | Shirts By League ID SportApi | leaguesAll | GET /{version}/{sport}/leagues | All SportApi | leaguesByCountryId | GET /{version}/{sport}/leagues/countries/{countryId} | By Country ID SportApi | leaguesByDate | GET /{version}/{sport}/leagues/date/{date} | By Date SportApi | leaguesByTeamId | GET /{version}/{sport}/teams/{teamId}/leagues | Leagues By Team ID SportApi | leaguesCurrentByTeamId | GET /{version}/{sport}/teams/{teamId}/leagues/current | Current Leagues By Team ID SportApi | leaguesLive | GET /{version}/{sport}/leagues/live | Live SportApi | leaguesSearch | GET /{version}/{sport}/leagues/search/{name} | Search SportApi | livescoresAll | GET /{version}/{sport}/livescores | All SportApi | livescoresAllInPlay | GET /{version}/{sport}/livescores/inplay | All In-play SportApi | livescoresLatest | GET /{version}/{sport}/livescores/latest | Last Updated In-play SportApi | newsAllPostMatch | GET /{version}/{sport}/news/post-match | All Post Match SportApi | newsAllPreMatch | GET /{version}/{sport}/news/pre-match | All Pre-match SportApi | newsPostMatchBySeasonId | GET /{version}/{sport}/news/post-match/seasons/{seasonId} | Post Match by Season ID SportApi | newsPreMatchBySeasonId | GET /{version}/{sport}/news/pre-match/seasons/{seasonId} | Pre-match By Season ID SportApi | newsUpcomingPostMatch | GET /{version}/{sport}/news/post-match/upcoming | Upcoming Post Match SportApi | newsUpcomingPreMatch | GET /{version}/{sport}/news/pre-match/upcoming | Upcoming Pre-match SportApi | oddsAllInPlay | GET /{version}/{sport}/odds/inplay | All In-play SportApi | oddsAllPreMatch | GET /{version}/{sport}/odds/pre-match | All Pre-match SportApi | oddsInPlayByFixtureAndBookmakerId | GET /{version}/{sport}/odds/inplay/fixtures/{fixtureId}/bookmakers/{bookmakerId} | In-play by Fixture and Bookmaker ID SportApi | oddsInPlayByFixtureAndMarketId | GET /{version}/{sport}/odds/inplay/fixtures/{fixtureId}/markets/{marketId} | In-play by Fixture and Market ID SportApi | oddsInPlayByFixtureId | GET /{version}/{sport}/odds/inplay/fixtures/{fixtureId} | In-play by Fixture ID SportApi | oddsLatestInPlay | GET /{version}/{sport}/odds/inplay/latest | Latest In-play SportApi | oddsLatestPreMatch | GET /{version}/{sport}/odds/pre-match/latest | Last Updated Pre-match SportApi | oddsPreMatchByFixtureAndBookmakerId | GET /{version}/{sport}/odds/pre-match/fixtures/{fixtureId}/bookmakers/{bookmakerId} | Pre-match by Fixture and Bookmaker ID SportApi | oddsPreMatchByFixtureAndMarketId | GET /{version}/{sport}/odds/pre-match/fixtures/{fixtureId}/markets/{marketId} | Pre-match by Fixture and Market ID SportApi | oddsPreMatchByFixtureId | GET /{version}/{sport}/odds/pre-match/fixtures/{fixtureId} | Pre-match by Fixture ID SportApi | playerById | GET /{version}/{sport}/players/{playerId} | By ID SportApi | playersAll | GET /{version}/{sport}/players | All SportApi | playersByCountryId | GET /{version}/{sport}/players/countries/{countryId} | By Country ID SportApi | playersLatest | GET /{version}/{sport}/players/latest | Latest Updated SportApi | playersSearch | GET /{version}/{sport}/players/search/{name} | Search SportApi | predictionsAll | GET /{version}/{sport}/predictions/probabilities | All SportApi | predictionsAllValueBets | GET /{version}/{sport}/predictions/value-bets | All Value Bets SportApi | predictionsByFixtureId | GET /{version}/{sport}/predictions/probabilities/fixtures/{fixtureId} | By Fixture ID SportApi | predictionsValueBetsByFixtureId | GET /{version}/{sport}/predictions/value-bets/fixtures/{fixtureId} | Value Bets by Fixture ID SportApi | refereeById | GET /{version}/{sport}/referees/{refereeId} | By ID SportApi | refereesAll | GET /{version}/{sport}/referees | All SportApi | refereesByCountryId | GET /{version}/{sport}/referees/countries/{countryId} | By Country ID SportApi | refereesBySeasonId | GET /{version}/{sport}/referees/seasons/{seasonId} | By Season ID SportApi | refereesSearch | GET /{version}/{sport}/referees/search/{name} | Search SportApi | rivalsAll | GET /{version}/{sport}/rivals | All SportApi | rivalsByTeamId | GET /{version}/{sport}/rivals/teams/{teamId} | By Team ID SportApi | roundById | GET /{version}/{sport}/rounds/{roundId} | By ID SportApi | roundsAll | GET /{version}/{sport}/rounds | All SportApi | roundsBySeasonId | GET /{version}/{sport}/rounds/seasons/{seasonId} | Season ID SportApi | roundsSearch | GET /{version}/{sport}/rounds/search/{name} | Search SportApi | schedulesBySeasonId | GET /{version}/{sport}/schedules/seasons/{seasonId} | By Season ID SportApi | schedulesByTeamAndSeasonId | GET /{version}/{sport}/schedules/seasons/{seasonId}/teams/{teamId} | By Team and Season ID SportApi | schedulesByTeamId | GET /{version}/{sport}/schedules/teams/{teamId} | By Team ID SportApi | seasonById | GET /{version}/{sport}/seasons/{seasonId} | By ID SportApi | seasonsAll | GET /{version}/{sport}/seasons | All SportApi | seasonsByTeamId | GET /{version}/{sport}/seasons/teams/{teamId} | By Team ID SportApi | seasonsSearch | GET /{version}/{sport}/seasons/search/{name} | Search SportApi | squadsBySeasonAndTeamId | GET /{version}/{sport}/squads/seasons/{seasonId}/teams/{teamId} | By Season and Team ID SportApi | squadsByTeamId | GET /{version}/{sport}/squads/teams/{teamId} | By Team ID SportApi | stageById | GET /{version}/{sport}/stages/{stageId} | By ID SportApi | stagesAll | GET /{version}/{sport}/stages | All SportApi | stagesBySeasonId | GET /{version}/{sport}/stages/seasons/{seasonId} | By Season ID SportApi | stagesSearch | GET /{version}/{sport}/stages/search/{name} | Search SportApi | standingCorrectionsBySeasonId | GET /{version}/{sport}/standings/corrections/seasons/{seasonId} | Correction by Season ID SportApi | standingsAll | GET /{version}/{sport}/standings | All SportApi | standingsByRoundId | GET /{version}/{sport}/standings/rounds/{roundId} | By Round ID SportApi | standingsBySeasonId | GET /{version}/{sport}/standings/seasons/{seasonId} | By Season ID SportApi | standingsLiveByLeagueId | GET /{version}/{sport}/standings/live/leagues/{leagueId} | By League ID SportApi | stateById | GET /{version}/{sport}/states/{stateId} | By ID SportApi | statesBySport | GET /{version}/{sport}/states | By Sport SportApi | teamsAll | GET /{version}/{sport}/teams | All SportApi | teamsByCountryId | GET /{version}/{sport}/teams/countries/{countryId} | By Country ID SportApi | teamsById | GET /{version}/{sport}/teams/{teamId} | By ID SportApi | teamsBySeasonId | GET /{version}/{sport}/teams/seasons/{seasonId} | By Season ID SportApi | teamsSearch | GET /{version}/{sport}/teams/search/{name} | Search SportApi | topScorersBySeasonId | GET /{version}/{sport}/topscorers/seasons/{seasonId} | By Season ID SportApi | topScorersByStageId | GET /{version}/{sport}/topscorers/stages/{stageId} | By Stage ID SportApi | tranfersByDateRange | GET /{version}/{sport}/transfers/between/{startDate}/{endDate} | By Date Range SportApi | transferById | GET /{version}/{sport}/transfers/{transferId} | By ID SportApi | transfersAll | GET /{version}/{sport}/transfers | All SportApi | transfersByPlayerId | GET /{version}/{sport}/transfers/players/{playerId} | By Player ID SportApi | transfersByTeamId | GET /{version}/{sport}/transfers/teams/{teamId} | By Team ID SportApi | transfersLatest | GET /{version}/{sport}/transfers/latest | Last Updated SportApi | tvStationById | GET /{version}/{sport}/tv-stations/{tvStationId} | By ID SportApi | tvStationsAll | GET /{version}/{sport}/tv-stations | All SportApi | tvStationsByFixtureId | GET /{version}/{sport}/tv-stations/fixtures/{fixtureId} | By Fixture ID SportApi | venueById | GET /{version}/{sport}/venues/{venueId} | By ID SportApi | venuesAll | GET /{version}/{sport}/venues | All SportApi | venuesBySeasonId | GET /{version}/{sport}/venues/seasons/{seasonId} | By Season ID SportApi | venuesSearch | GET /{version}/{sport}/venues/search/{name} | Search TypesApi | all | GET /{version}/core/types | All TypesApi | getById | GET /{version}/core/types/{typeId} | By ID