Skip to content

Commit 405c171

Browse files
authored
Merge pull request #95 from SharpBit/development
4.2.0 Changes
2 parents 02af73c + c519cbe commit 405c171

22 files changed

+444
-311
lines changed

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
token = # Replace this with your API token
2-
base_url = # Proxy server to handle requests to API due to IP limitations
1+
TOKEN = # Replace this with your API token
2+
BASE_URL = # Proxy server to handle requests to API due to IP limitations

.github/workflows/tests.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: tests
5+
6+
on:
7+
push:
8+
branches: [ "master", "development" ]
9+
pull_request:
10+
branches: [ "master", "development" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: ["3.9", "3.10", "3.11", "3.12"]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v3
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install -r requirements-dev.txt
31+
python -m pip install .
32+
- name: Lint with flake8
33+
run: |
34+
# stop the build if there are Python syntax errors or undefined names
35+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36+
- name: Test with pytest
37+
env:
38+
TOKEN: ${{ secrets.TOKEN }}
39+
BASE_URL: ${{ secrets.BASE_URL }}
40+
run: |
41+
pytest

.readthedocs.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.9"
12+
# You can also specify other tool versions:
13+
# nodejs: "20"
14+
# rust: "1.70"
15+
# golang: "1.20"
16+
17+
# Build documentation in the "docs/" directory with Sphinx
18+
sphinx:
19+
configuration: docs/conf.py
20+
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
21+
# builder: "dirhtml"
22+
# Fail on all warnings to avoid broken references
23+
# fail_on_warning: true
24+
25+
# Optionally build your docs in additional formats such as PDF and ePub
26+
# formats:
27+
# - pdf
28+
# - epub
29+
30+
# Optional but recommended, declare the Python requirements required
31+
# to build your documentation
32+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
33+
python:
34+
install:
35+
- requirements: docs/requirements.txt

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## [4.2.0] - 10/8/24
5+
### Added
6+
- Implemented an endpoint with `Client.get_event_rotation` which gets the events in the current rotation.
7+
- Added a method `Player.get_battle_logs` which directly gets the player's battle log.
8+
### Fixed
9+
- Client actually uses session passed into parameters now instead of creating a new one anyways
10+
- `UnexpectedError` now properly shows the returned text in the message
11+
- The `use_cache` parameter now works for `get_brawlers` and the async client
12+
### Removed
13+
- Removed the prevent_ratelimit option for the Client
14+
- Dropped support for Python 3.5, 3.6, 3.7, and 3.8
15+
- Removed `Client.get_constants` as the site that was hosting it is no longer running
16+
417
## [4.1.1] - 10/31/21
518
### Fixed
619
- Installation dependency issue with aiohttp

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018-2020 SharpBit
3+
Copyright (c) 2018-2024 SharpBit
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.rst

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Brawl Stats
88
:target: https://pypi.org/project/brawlstats/
99
:alt: PyPi
1010

11-
.. image:: https://travis-ci.com/SharpBit/brawlstats.svg?branch=master
12-
:target: https://travis-ci.com/SharpBit/brawlstats
13-
:alt: Travis-CI build
11+
.. image:: https://github.com/SharpBit/brawlstats/actions/workflows/tests.yml/badge.svg
12+
:target: https://github.com/SharpBit/brawlstats/actions/workflows/tests.yml
13+
:alt: GitHub Actions Tests
1414

1515
.. image:: https://img.shields.io/pypi/pyversions/brawlstats.svg
1616
:target: https://pypi.org/project/brawlstats/
@@ -20,8 +20,12 @@ Brawl Stats
2020
:target: https://github.com/SharpBit/brawlstats/blob/master/LICENSE
2121
:alt: MIT License
2222

23-
- This library is a sync and async wrapper for the Brawl Stars API.
24-
- Python 3.5.3 or later is required.
23+
.. image:: https://readthedocs.org/projects/brawlstats/badge/?version=stable
24+
:target: https://brawlstats.readthedocs.io/en/stable/?badge=stable
25+
:alt: Documentation Status
26+
27+
- BrawlStats is a sync and async Python API wrapper to fetch statistics from the official Brawl Stars API.
28+
- Python 3.9 or later is required.
2529

2630
Features
2731
~~~~~~~~
@@ -31,7 +35,8 @@ Features
3135
- Get a player profile and battlelog.
3236
- Get a club and its members.
3337
- Get the top 200 rankings for players, clubs, or a specific brawler.
34-
- Get information about maps, brawlers, and more!
38+
- Get information about all the brawlers in the game.
39+
- Get information about the current event rotation!
3540

3641
Installation
3742
~~~~~~~~~~~~
@@ -72,31 +77,29 @@ Contributing
7277
~~~~~~~~~~~~
7378
Special thanks to this project's contributors ❤️
7479

75-
- `4JR`_
80+
- `erickang21`_
81+
- `fourjr`_
7682
- `golbu`_
77-
- `kawaii banana`_
7883
- `kjkui`_
79-
- `Kyber`_
84+
- `kyb3r`_
8085
- `Papiersnipper`_
81-
- `Pollen`_
8286
- `OrangutanGaming`_
8387
- `Stitch`_
8488

8589
If you want to contribute, whether it be a bug fix or new feature, make sure to follow the `contributing guidelines`_.
8690
This project is no longer actively maintained. No new features will be added, only bugfixes and security fixes will be accepted.
8791

8892
.. _create an issue: https://github.com/SharpBit/brawlstats/issues
89-
.. _Read the Docs: https://brawlstats.rtfd.io/
93+
.. _Read the Docs: https://brawlstats.readthedocs.io/en/stable/
9094
.. _examples folder: https://github.com/SharpBit/brawlstats/tree/master/examples
9195
.. _discord.py: https://github.com/rapptz/discord.py
9296
.. _contributing guidelines: https://github.com/SharpBit/brawlstats/blob/master/CONTRIBUTING.md
9397

94-
.. _4JR: https://github.com/fourjr
98+
.. _erickang21: https://github.com/erickang21
99+
.. _fourjr: https://github.com/fourjr
95100
.. _OrangutanGaming: https://github.com/OrangutanGaming
96101
.. _Stitch: https://github.com/Soumil07
97102
.. _kjkui: https://github.com/kjkui
98-
.. _Kyber: https://github.com/kyb3r
103+
.. _kyb3r: https://github.com/kyb3r
99104
.. _Papiersnipper: https://github.com/robinmahieu
100-
.. _Pollen: https://github.com/pollen5
101-
.. _kawaii banana: https://github.com/bananaboy21
102105
.. _golbu: https://github.com/0dminnimda

brawlstats/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
############
88

99

10-
__version__ = 'v4.1.1'
10+
__version__ = 'v4.2.0'
1111
__title__ = 'brawlstats'
1212
__license__ = 'MIT'
1313
__author__ = 'SharpBit'

0 commit comments

Comments
 (0)