Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.2.0 Changes #95

Merged
merged 31 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a0593cc
Merge pull request #92 from SharpBit/master
SharpBit Oct 6, 2024
68d9360
Update documentation with new attributes and more attribute tables
SharpBit Oct 6, 2024
de14d5f
Fix a bug where the session being passed in wasn't actually being used
SharpBit Oct 6, 2024
5e1ba0a
Fix a bug where the text wasn't being shown in the message of Unexpec…
SharpBit Oct 6, 2024
76215a3
Merge branch 'development' of https://github.com/SharpBit/brawlstats …
SharpBit Oct 6, 2024
a8f8125
update readthedocs python version to 3.6
SharpBit Oct 6, 2024
e89c487
try to fix .readthedocs.yaml
SharpBit Oct 6, 2024
59f4bf6
some more doc updates to make shorter codeblocks
SharpBit Oct 6, 2024
a65476a
note that discord example is outdated
SharpBit Oct 6, 2024
8edfa85
Drop support for Python 3.5, 3.6, 3.7, 3.8
SharpBit Oct 6, 2024
54f76c0
Remove prevent_ratelimit option for the client
SharpBit Oct 6, 2024
b51e29d
Properly tearDown in async tests and match ordering in blocking tests
SharpBit Oct 6, 2024
92ae917
Fix bug with use_cache and change most .format() to f-strings to drop…
SharpBit Oct 7, 2024
a084729
Update docs and fix tox.ini to properly run flake8 on the whole repo
SharpBit Oct 7, 2024
7574957
update license year and setup.py python version
SharpBit Oct 7, 2024
b894839
Add `Client.get_event_rotation()` #94
SharpBit Oct 7, 2024
1a1bf30
Add `Player.get_battle_logs` #93
SharpBit Oct 7, 2024
4b021a0
remove `Client.get_constants`
SharpBit Oct 7, 2024
8b7ee41
Python package workflow
SharpBit Oct 7, 2024
7d598f6
Install the package in the ci workflow
SharpBit Oct 7, 2024
50c478b
delete github workflow
SharpBit Oct 7, 2024
8aee1f1
update travis envs
SharpBit Oct 7, 2024
025d099
try using xenial for travis
SharpBit Oct 7, 2024
5c2d2bf
try using focal dist for travis
SharpBit Oct 7, 2024
3a7ba8f
remove asynctest as a dependency since asyncio.coroutine is deprecated
SharpBit Oct 7, 2024
cb011af
try github workflows again since travis-ci costs money now...
SharpBit Oct 7, 2024
9ccfc28
farewell travis, you will not be missed
SharpBit Oct 7, 2024
2c4992e
update some descriptions and tags
SharpBit Oct 7, 2024
72b463e
Add some badges
SharpBit Oct 7, 2024
7f2052b
Update version to 4.2.0 and fix github actions badge url
SharpBit Oct 8, 2024
c519cbe
Update 4.2.0 date
SharpBit Oct 8, 2024
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
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
token = # Replace this with your API token
base_url = # Proxy server to handle requests to API due to IP limitations
TOKEN = # Replace this with your API token
BASE_URL = # Proxy server to handle requests to API due to IP limitations
41 changes: 41 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: tests

on:
push:
branches: [ "master", "development" ]
pull_request:
branches: [ "master", "development" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
python -m pip install .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Test with pytest
env:
TOKEN: ${{ secrets.TOKEN }}
BASE_URL: ${{ secrets.BASE_URL }}
run: |
pytest
35 changes: 35 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.9"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Change Log
All notable changes to this project will be documented in this file.

## [4.2.0] - 10/8/24
### Added
- Implemented an endpoint with `Client.get_event_rotation` which gets the events in the current rotation.
- Added a method `Player.get_battle_logs` which directly gets the player's battle log.
### Fixed
- Client actually uses session passed into parameters now instead of creating a new one anyways
- `UnexpectedError` now properly shows the returned text in the message
- The `use_cache` parameter now works for `get_brawlers` and the async client
### Removed
- Removed the prevent_ratelimit option for the Client
- Dropped support for Python 3.5, 3.6, 3.7, and 3.8
- Removed `Client.get_constants` as the site that was hosting it is no longer running

## [4.1.1] - 10/31/21
### Fixed
- Installation dependency issue with aiohttp
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2020 SharpBit
Copyright (c) 2018-2024 SharpBit

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
33 changes: 18 additions & 15 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Brawl Stats
:target: https://pypi.org/project/brawlstats/
:alt: PyPi

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

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

- This library is a sync and async wrapper for the Brawl Stars API.
- Python 3.5.3 or later is required.
.. image:: https://readthedocs.org/projects/brawlstats/badge/?version=stable
:target: https://brawlstats.readthedocs.io/en/stable/?badge=stable
:alt: Documentation Status

- BrawlStats is a sync and async Python API wrapper to fetch statistics from the official Brawl Stars API.
- Python 3.9 or later is required.

Features
~~~~~~~~
Expand All @@ -31,7 +35,8 @@ Features
- Get a player profile and battlelog.
- Get a club and its members.
- Get the top 200 rankings for players, clubs, or a specific brawler.
- Get information about maps, brawlers, and more!
- Get information about all the brawlers in the game.
- Get information about the current event rotation!

Installation
~~~~~~~~~~~~
Expand Down Expand Up @@ -72,31 +77,29 @@ Contributing
~~~~~~~~~~~~
Special thanks to this project's contributors ❤️

- `4JR`_
- `erickang21`_
- `fourjr`_
- `golbu`_
- `kawaii banana`_
- `kjkui`_
- `Kyber`_
- `kyb3r`_
- `Papiersnipper`_
- `Pollen`_
- `OrangutanGaming`_
- `Stitch`_

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

.. _create an issue: https://github.com/SharpBit/brawlstats/issues
.. _Read the Docs: https://brawlstats.rtfd.io/
.. _Read the Docs: https://brawlstats.readthedocs.io/en/stable/
.. _examples folder: https://github.com/SharpBit/brawlstats/tree/master/examples
.. _discord.py: https://github.com/rapptz/discord.py
.. _contributing guidelines: https://github.com/SharpBit/brawlstats/blob/master/CONTRIBUTING.md

.. _4JR: https://github.com/fourjr
.. _erickang21: https://github.com/erickang21
.. _fourjr: https://github.com/fourjr
.. _OrangutanGaming: https://github.com/OrangutanGaming
.. _Stitch: https://github.com/Soumil07
.. _kjkui: https://github.com/kjkui
.. _Kyber: https://github.com/kyb3r
.. _kyb3r: https://github.com/kyb3r
.. _Papiersnipper: https://github.com/robinmahieu
.. _Pollen: https://github.com/pollen5
.. _kawaii banana: https://github.com/bananaboy21
.. _golbu: https://github.com/0dminnimda
2 changes: 1 addition & 1 deletion brawlstats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
############


__version__ = 'v4.1.1'
__version__ = 'v4.2.0'
__title__ = 'brawlstats'
__license__ = 'MIT'
__author__ = 'SharpBit'
Expand Down
Loading
Loading