Skip to content

Commit

Permalink
Merge pull request #95 from SharpBit/development
Browse files Browse the repository at this point in the history
4.2.0 Changes
  • Loading branch information
SharpBit authored Oct 8, 2024
2 parents 02af73c + c519cbe commit 405c171
Show file tree
Hide file tree
Showing 22 changed files with 444 additions and 311 deletions.
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

0 comments on commit 405c171

Please sign in to comment.