GithubHelp home page GithubHelp logo

devadeboye / naijabet_api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jayteealao/naijabet_api

0.0 0.0 0.0 78 KB

A python library that provides access to the odds data of Nigeria's major betting sites

License: MIT License

Python 100.00%

naijabet_api's Introduction

NaijaBet-Api

publish-pypi

A python library that provides access to the odds data of Nigeria's major betting sites.

It provides access to Bet9ja, Betking and Nairabet's 1X2 and doublechance soccer odds.

Basic Usage

Import the requested bookmaker:

from NaijaBet_Api.bookmakers import bet9ja, betking, nairabet

Access specific bookmaker

from NaijaBet_Api.bookmakers import bet9ja

b9 = bet9ja.Bet9ja()

Obtain League data:
note: in order to access a specific league you need to provide the league as an argument via the Betid Enum Class

from NaijaBet_Api.bookmakers import bet9ja
from NaijaBet_Api.id import Betid

b9 = bet9ja.Bet9ja()
b9.get_league(Betid.PREMIERLEAGUE)

Obtain all league data:

from NaijaBet_Api.bookmakers import bet9ja
from NaijaBet_Api.id import Betid

b9 = bet9ja.Bet9ja()
b9.get_all()

The get_all and get_league methods return a list of dicts
example:

[{'away': 1.92,
  'draw': 3.75,
  'draw_or_away': 1.28,
  'home': 4.0,
  'home_or_away': 1.3,
  'home_or_draw': 1.89,
  'league': 'Premier League',
  'league_id': 135975,
  'match': 'Brentford FC - Arsenal FC',
  'match_id': 4467373,
  'time': 1628881200000},
 {'away': 5.6,
  'draw': 4.8,
  'draw_or_away': 2.47,
  'home': 1.54,
  'home_or_away': 1.21,
  'home_or_draw': 1.18,
  'league': 'Premier League',
  'league_id': 135975,
  'match': 'Manchester United FC - Leeds United',
  'match_id': 4467299,
  'time': 1628940600000},]

TODO

  • Add Sportybet
  • Add all soccer leagues
  • Add access to available bookmaker odds for specific matches

naijabet_api's People

Contributors

jayteealao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.