Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ ENABLE_CACHING=false
# 3. Go to Network tab
# 4. Make any action that triggers a GraphQL request
# 5. Right-click on the request → Copy as cURL
# 6. Extract the x-access-token, session cookie, and cf_clearance token from the cURL command
# 6. Extract the x-access-token, session cookie, and cf_clearance token from the cURL command
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v3
Expand All @@ -28,15 +28,15 @@ jobs:

- name: Lint with flake8
run: |
flake8 stakeapi tests examples
flake8 --max-line-length=88 --extend-ignore=E203 stakeapi tests examples

- name: Check formatting with black
run: |
black --check stakeapi tests examples
black --check --line-length 88 stakeapi tests examples

- name: Check import sorting with isort
run: |
isort --check-only stakeapi tests examples
isort --check-only --profile black --line-length 88 stakeapi tests examples

- name: Type check with mypy
run: |
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"

- name: Install build dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ logs/
temp/
cache/

cookie.txt
cookie.txt
13 changes: 7 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -11,26 +11,27 @@ repos:
- id: debug-statements

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 24.10.0
hooks:
- id: black
language_version: python3

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
args: ["--profile", "black", "--line-length", "88"]

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 7.1.1
hooks:
- id: flake8
args: [--max-line-length=88, --extend-ignore=E203]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies: [types-requests]
pass_filenames: false
args: [--ignore-missing-imports]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ An unofficial Python API wrapper for stake.com - the online gambling platform.
## ⚠️ Disclaimer

This is an unofficial API wrapper and is not affiliated with, endorsed by, or connected to stake.com in any way. Use at your own risk and ensure compliance with all applicable laws and regulations in your jurisdiction.

## Features

- 🎰 Access to casino games data
Expand Down
2 changes: 1 addition & 1 deletion curl-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ curl ^"https://stake.com/_api/graphql^" ^
-H ^"x-language: fr^" ^
-H ^"x-operation-name: CurrencyConfiguration^" ^
-H ^"x-operation-type: query^" ^
--data-raw ^"^{^\^"query^\^":^\^"query CurrencyConfiguration(^$isAcp: Boolean^!) ^{^\^\n currencyConfiguration(isAcp: ^$isAcp) ^{^\^\n baseRates ^{^\^\n currency^\^\n baseRate^\^\n ^}^\^\n launchedFiatCurrencies^\^\n displayFiatCurrencies^\^\n ^}^\^\n^}^\^",^\^"variables^\^":^{^\^"isAcp^\^":false^}^}^"
--data-raw ^"^{^\^"query^\^":^\^"query CurrencyConfiguration(^$isAcp: Boolean^!) ^{^\^\n currencyConfiguration(isAcp: ^$isAcp) ^{^\^\n baseRates ^{^\^\n currency^\^\n baseRate^\^\n ^}^\^\n launchedFiatCurrencies^\^\n displayFiatCurrencies^\^\n ^}^\^\n^}^\^",^\^"variables^\^":^{^\^"isAcp^\^":false^}^}^"
2 changes: 1 addition & 1 deletion docs/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Each step is covered in detail in the pages below. Most developers are up and ru

## Prerequisites

- Python 3.8 or higher
- Python 3.10 or higher
- A [Stake.com account](https://stake.com/?c=WY7953wQ)
- Basic knowledge of Python and async/await

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ StakeAPI version: 0.1.0

| Requirement | Minimum |
|:------------|:--------|
| Python | 3.8+ |
| Python | 3.10+ |
| OS | Windows, macOS, Linux |
| Memory | 64 MB |
| Network | Internet connection required |
Expand Down
12 changes: 6 additions & 6 deletions docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Go from zero to your first API call in under 60 seconds.

Before continuing, make sure you have:

- [x] Python 3.8+ installed
- [x] Python 3.10+ installed
- [x] StakeAPI installed (`pip install stakeapi`)
- [x] A [Stake.com account](https://stake.com/?c=WY7953wQ) with an access token

Expand All @@ -34,20 +34,20 @@ from stakeapi import StakeAPI
async def main():
# Replace with your actual access token
async with StakeAPI(access_token="your_access_token_here") as client:

# 1. Get your balance
balance = await client.get_user_balance()
print("💰 Your Balance:")
for currency, amount in balance["available"].items():
if amount > 0:
print(f" {currency.upper()}: {amount}")

# 2. Browse casino games
games = await client.get_casino_games(category="slots")
print(f"\n🎰 Found {len(games)} slot games!")
for game in games[:5]:
print(f" - {game.name} by {game.provider}")

# 3. Check sports events
events = await client.get_sports_events(sport="football")
print(f"\n⚽ Found {len(events)} football events!")
Expand Down Expand Up @@ -80,7 +80,7 @@ async def main():
if not token:
print("Set STAKE_ACCESS_TOKEN environment variable!")
return

async with StakeAPI(access_token=token) as client:
balance = await client.get_user_balance()
print(balance)
Expand Down Expand Up @@ -126,7 +126,7 @@ async def main():
client.get_casino_games(),
client.get_sports_events(),
)

print(f"Balance: {balance}")
print(f"Games: {len(games)}")
print(f"Events: {len(events)}")
Expand Down
Loading