0.0.32 • Published 7 years ago
rtsmunity-public-api-sdk v0.0.32
Node.js PULL API SDK
You need to have API key and client certificate to use this SDK.
Installation
For Node.js
npm
npm install rtsmunity-public-api-sdk --save
Getting Started
Please follow the installation instruction and execute the following JS code:
var RTSmunitySDK = require('rtsmunity-public-api-sdk');
var API_KEY = 'YOUR-API-KEY'
var KEY_PATH = 'PATH_TO_YOUR_CLIENT_KEY'
var CERT_PATH = 'PATH_TO_YOUR_CLIENT_CRT'
var PASSPHRASE = 'PASSPHRASE_FOR_YOUR_CLIENT_KEY'
var api = RTSmunitySDK.init(API_KEY, KEY_PATH, CERT_PATH, PASSPHRASE, RTSmunitySDK.MODE.SANDBOX)
api.sports.getSports((err, sports) => {
if (err) {
console.log('Unable to get sports')
console.log(err)
} else {
console.log('Sports:')
console.log(sports)
}
})
Documentation for API Endpoints
All URIs are relative to https://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
api.leagues | getLeagues | GET /{sport}/leagues | List All Leagues |
api.liveMatches | getMatchFeed | GET /{sport}/live/matches/{id}/feed | Match feed |
api.liveMatches | getMatchState | GET /{sport}/live/matches/{id}/state | Match state |
api.liveMatches | getMatchStatisticsFeed | GET /{sport}/live/matches/{id}/statistics/feed | Match statistics feed |
api.liveMatches | getMatchStatisticsState | GET /{sport}/live/matches/{id}/statistics/state | Match statistics state |
api.liveMatches | getMatches | GET /{sport}/live/matches | List All Live Matches |
api.liveSeries | getSeries | GET /{sport}/live/series | List All Live Series |
api.liveSeries | getSeriesFeed | GET /{sport}/live/series/{id}/feed | Series feed |
api.liveSeries | getSeriesState | GET /{sport}/live/series/{id}/state | Series state |
api.markets | getMarketCloseTimes | GET /{sport}/market/close_times | List All Markets close times |
api.markets | getMarketResolveTimes | GET /{sport}/market/resolve_times | List All Markets resolve times |
api.markets | getMarketSelections | GET /{sport}/market/selections | List All Selections |
api.markets | getMarketStates | GET /{sport}/market/states | List All Markets states |
api.markets | getMarkets | GET /{sport}/markets | List All Markets |
api.matches | getMatchPositions | GET /{sport}/match/positions | List All Match positions |
api.matches | getMatchStates | GET /{sport}/match/states | List All Matches states |
api.matches | getMatches | GET /{sport}/matches | List All Matches in Series |
api.players | getPlayers | GET /{sport}/players | List All Players |
api.series | getSeries | GET /{sport}/series | List All Series for tournament |
api.series | getSeriesState | GET /{sport}/series/states/{id} | Get concrete Series state |
api.series | getSeriesStates | GET /{sport}/series/states | List All Series states |
api.series | getSeriesTypes | GET /{sport}/series/types | List All Series types |
api.sports | getSports | GET /sports | List All Sports |
api.teams | getTeams | GET /{sport}/teams | List All Teams |
api.tournaments | getTournaments | GET /{sport}/tournaments | List All Tournaments |