@betting-api/marathonbet
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

MarathonBet bookmaker odds api.

Api rest client for betting-api.com

Installation

yarn add @betting-api/marathonbet

or

npm i -S @betting-api/marathonbet

Then you can import it like:

import marathonbet from '@betting-api/marathonbet'
// or
const marathonbet = require('@betting-api/marathonbet').default

Authorization

To start using api, you need to create app at https://betting-api.com/console

Then:

marathonbet.registerApp({
    secret_key: 'XXXXXXXXX',
})

Methods

const liveList = await marathonbet.football.getLiveAll()
const liveSingleMatch = await marathonbet.football.getLive(255860098)
const liveLeagues = await marathonbet.football.getLiveLeagues()
const liveLeagueMatches = await marathonbet.football.getLiveLeagueMatches('league_id')

const prematchList = await marathonbet.football.getPreMatchAll()
const prematchSingle = await marathonbet.football.getPreMatch(255860098)
const prematchLeagues = await marathonbet.football.getPreMatchLeagues()
const prematchLeagueMatches = await marathonbet.football.getPreMatchLeagueMatches('league_id')

const anyMatchSingle = await marathonbet.football.getMatch(255860098)
const serverInfo = await marathonbet.football.getInfo()

Typescript

Project have typescript support and you may find useful to use it.

Types:

  • MarathonBetFootballMatch - full match info
  • MarathonBetFootballLeague - league info

Readme

Keywords

none

Package Sidebar

Install

npm i @betting-api/marathonbet

Weekly Downloads

1

Version

0.1.0

License

ISC

Unpacked Size

22.6 kB

Total Files

15

Last publish

Collaborators

  • betting-api