Skip to content

Commit 4de17a1

Browse files
authored
Merge pull request #47 from SharpBit/development
Development of v4.0.0
2 parents 0b0544f + 579b3a6 commit 4de17a1

37 files changed

Lines changed: 254 additions & 1569 deletions

.env.example

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

CHANGELOG.md

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

4-
## [3.0.3] - 3/8/20
4+
## [4.0.0] - TBD
5+
### Added
6+
- `reason` attribute for `NotFoundError`
7+
### Removed
8+
- BrawlAPI client
9+
### Changed
10+
- `Client.get_datetime` moved to utils
11+
- `get_rankings` now requires all arguments to be keyword arguments
12+
### Fixed
13+
- Brawler leaderboard now works
14+
15+
## [3.0.4] - 3/8/20
16+
### Changed
17+
- Leaderboard functions reverted to one function for all types of leaderboards/rankings
18+
19+
## [3.0.3] - 2/17/20
520
### Added
621
- `invalid_chars` attribute for `NotFoundError` when applicable
722
- `url` attribute for all errors that have requested a URL
823
- `str(error)` will return the message attribute of the error.
924
### Changed
1025
- The `error` attribute for all errors have been renamed to `message`
26+
- For BrawlAPI: `get_leaderboard` split up into `get_player_leaderboard`, `get_club_leaderboard`, and `get_brawler_leaderboard`
27+
- For the official API: `get_rankings` split up into `get_player_rankings`, `get_club_rankings`, and `get_brawler_rankings`
1128

1229
## [3.0.2] - 12/22/19
1330
### Fixed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
6. Add the necessary tests in the `tests` folder
99
7. Add the necessary documentation and docstrings
1010
8. Add the necessary points to `CHANGELOG.md`
11-
9. Fill up the `tests/.env` file with the suitable token(s)
12-
10. Run `tox` from the root folder and ensure the tests are configured correctly and they return OK. `ServerError` and `MaintenanceError` can be disregarded.
11+
9. Fill up the `.env` file
12+
10. Run `tox` from the root folder and ensure the tests are configured correctly and they return OK. `ServerError` can be disregarded.
1313
11. Open your PR
1414

1515
Do not increment version numbers but update `CHANGELOG.md`

MANIFEST.in

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

README.rst

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,18 @@ 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 https://api.starlist.pro (BrawlAPI) and the official Brawl Stars API.
23+
- This library is a sync and async wrapper for the Brawl Stars API.
2424
- Python 3.5.3 or later is required.
2525

2626
Features
2727
~~~~~~~~
2828

29-
- Covers all of the endpoints of both APIs.
30-
- Use the same client for sync and async usage.
31-
- Choose which API you want to use!
32-
- Access game constants such as maps, brawlers, and images.
3329
- Easy to use with an object oriented design.
30+
- Use the same client for sync and async usage.
31+
- Get a player profile and battlelog.
32+
- Get a club and its members.
33+
- Get the top 200 rankings for players, clubs, or a specific brawler.
34+
- Get information about maps, brawlers, and more!
3435

3536
Installation
3637
~~~~~~~~~~~~
@@ -45,7 +46,7 @@ Install the development build:
4546

4647
::
4748

48-
pip install git+https://github.com/SharpBit/brawlstats
49+
pip install git+https://github.com/SharpBit/brawlstats@development
4950

5051
Documentation
5152
~~~~~~~~~~~~~
@@ -54,7 +55,7 @@ Documentation is being hosted on `Read the Docs`_.
5455

5556
Examples
5657
~~~~~~~~
57-
Examples are in the `examples folder`_. Within each folder, you will find:
58+
Examples are in the `examples folder`_.
5859

5960
- ``sync.py`` shows you basic sync usage
6061
- ``async.py`` shows you basic async usage
@@ -64,9 +65,8 @@ Misc
6465
~~~~
6566

6667
- If you are currently using this wrapper, please star this repository :)
67-
- If you come across an issue in the wrapper, please `create an issue`_. Do **not** PM me on Discord for help.
68-
- If you need an API Key for BrawlAPI, create one using the `dashboard`_. If you need one for the official API, visit https://developer.brawlstars.com
69-
- To receive help for using the BrawlAPI, I recommend you join BrawlAPI's `discord server`_.
68+
- If you come across an issue in the wrapper, please `create an issue`_.
69+
- If you need an API key, visit https://developer.brawlstars.com
7070

7171
Contributing
7272
~~~~~~~~~~~~
@@ -83,12 +83,10 @@ Special thanks to this project's contributors ❤️
8383
If you want to contribute, whether it be a bug fix or new feature, make sure to follow the `contributing guidelines`_.
8484

8585
.. _create an issue: https://github.com/SharpBit/brawlstats/issues
86-
.. _discord server: https://discord.gg/vbbHXNf
8786
.. _Read the Docs: https://brawlstats.rtfd.io/
8887
.. _examples folder: https://github.com/SharpBit/brawlstats/tree/master/examples
8988
.. _discord.py: https://github.com/rapptz/discord.py
9089
.. _contributing guidelines: https://github.com/SharpBit/brawlstats/blob/master/CONTRIBUTING.md
91-
.. _dashboard: https://api.starlist.pro/dashboard
9290

9391
.. _4JR: https://github.com/fourjr
9492
.. _OrangutanGaming: https://github.com/OrangutanGaming

brawlstats/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from .brawlapi import Client as BrawlAPI
2-
from .officialapi import Client as OfficialAPI
1+
from .core import Client
2+
from .models import *
33
from .errors import *
44

55

@@ -8,7 +8,7 @@
88
############
99

1010

11-
__version__ = 'v3.0.4'
11+
__version__ = 'v4.0.0'
1212
__title__ = 'brawlstats'
1313
__license__ = 'MIT'
1414
__author__ = 'SharpBit'

brawlstats/brawlapi/__init__.py

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

0 commit comments

Comments
 (0)