Skip to content

Commit

Permalink
Update fastapi docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Simatwa committed Apr 10, 2024
1 parent ae961d1 commit 1a98d45
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1 align="center">smartbetsAPI</h1>
<p align="center">
<a href="https://github.com/Simatwa/smartbetsAPI"><img alt="Github" src="https://img.shields.io/static/v1?logo=github&color=blueviolet&label=Test&message=Passing"/></a> <a href="LICENSE"><img alt="License" src="https://img.shields.io/static/v1?logo=GPL&color=Blue&message=GPL-v3&label=License"/></a> <a href="https://pypi.org/project/smartbetsAPI"><img alt="PyPi" src="https://img.shields.io/static/v1?logo=pypi&label=Pypi&message=v1.2.4&color=green"/></a> <a href="https://github.com/psf/black"><img alt="Black" src="https://img.shields.io/static/v1?logo=Black&label=Code-style&message=Black"/></a> <a href="#"><img alt="Accuracy" src="https://img.shields.io/static/v1?logo=accuracy&label=Accuracy&message=55%&color=yellow"/></a> <a href="#"><img alt="Passing" src="https://img.shields.io/static/v1?logo=Docs&label=Docs&message=Passing&color=green"/></a> <a href="#"><img alt="coverage" src="https://img.shields.io/static/v1?logo=Coverage&label=Coverage&message=100%&color=yellowgreen"/></a> <a href="#" alt="progress"><img alt="Progress" src="https://img.shields.io/static/v1?logo=Progress&label=Progress&message=95%&color=green"/></a> <a href="https://pepy.tech/project/smartbetsapi"><img src="https://static.pepy.tech/personalized-badge/smartbetsapi?period=total&units=international_system&left_color=grey&left_text=Downloads" alt="Downloads"></a></p><br>
<a href="https://github.com/Simatwa/smartbetsAPI"><img alt="Github" src="https://img.shields.io/static/v1?logo=github&color=blueviolet&label=Test&message=Passing"/></a> <a href="LICENSE"><img alt="License" src="https://img.shields.io/static/v1?logo=GPL&color=Blue&message=GPL-v3&label=License"/></a> <a href="https://pypi.org/project/smartbetsAPI"><img alt="PyPi" src="https://img.shields.io/static/v1?logo=pypi&label=Pypi&message=v1.2.5&color=green"/></a> <a href="https://github.com/psf/black"><img alt="Black" src="https://img.shields.io/static/v1?logo=Black&label=Code-style&message=Black"/></a> <a href="#"><img alt="Accuracy" src="https://img.shields.io/static/v1?logo=accuracy&label=Accuracy&message=55%&color=yellow"/></a> <a href="#"><img alt="Passing" src="https://img.shields.io/static/v1?logo=Docs&label=Docs&message=Passing&color=green"/></a> <a href="#"><img alt="coverage" src="https://img.shields.io/static/v1?logo=Coverage&label=Coverage&message=100%&color=yellowgreen"/></a> <a href="#" alt="progress"><img alt="Progress" src="https://img.shields.io/static/v1?logo=Progress&label=Progress&message=95%&color=green"/></a> <a href="https://pepy.tech/project/smartbetsapi"><img src="https://static.pepy.tech/personalized-badge/smartbetsapi?period=total&units=international_system&left_color=grey&left_text=Downloads" alt="Downloads"></a></p><br>

> "Punter's choice"
Expand Down
2 changes: 1 addition & 1 deletion smartbets_API/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.2.4"
__version__ = "1.2.5"
__author__ = "Smartwa Caleb"
from .bet_at_rest_api_level import predictor as rest_api
from .predictor import predictor
Expand Down
22 changes: 20 additions & 2 deletions smartbets_API/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,28 @@ def parse_handler():


class Match(BaseModel):
"""Football match teams and net flag"""
"""Football match teams and net flag
- `home` : Home team (1)
- `away` : Away team (2)
- `net` : Use latest data from internet
"""

home: str
away: str
net: bool = False


class Prediction(BaseModel):
"""Match prediction"""
"""Match prediction
- `g` : Goal-average of the two teams
- `gg` : Probability of both teams to score
- `ov15` : Probability of having more than 2 goals
- `ov25` : Probability of having more than 3 goals
- `ov35` : Probability of having more than 4 goals
- `choice` : Probability of the specified 'result' to occur
- `result` : The most suitable outcome from [1,1x,x,2x,2]
- `pick` : The most suitable outcome from [1,1x,x,2x,2,gg,ov15,ov25,ov35]
"""

g: float
gg: float
Expand All @@ -124,6 +137,11 @@ class Prediction(BaseModel):


class ServerStatus(BaseModel):
"""Checks server's running status
- `is_alive` : Is server running?
- `as_at` : Datetime when status was generated.
"""

is_alive: bool = True
as_at: datetime = datetime.utcnow()

Expand Down

0 comments on commit 1a98d45

Please sign in to comment.