├── CONTRIBUTING.md ├── README.md └── showcase └── wrappers.md /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Issues 2 | In this repository, issues are meant for the following purposes: 3 | - Questions about the API 4 | - It could be a as simple as "How do I get a band tag from a /profile" 5 | - Suggestions for the API 6 | - Feedback towards existing features 7 | - Bearer token blacklist appeals 8 | - To apply for the following section (actually contributing) 9 | 10 | Issues that are meant to spite anger and frustration in the community will be locked and closed. 11 | If a user continously does that, he might get blocked from the repository and lose access to the API. 12 | 13 | # Actually Contributing 14 | By this, I mean making the API. 15 | 16 | To contribute in this section, you must fulfill all of the below requirements: 17 | - Know how to work with the data supercell gives, decrypting it and stuff like that. 18 | - Already made an existing api, whether it has just one line of information of 20 lines, private or public, as long as I myself can access it for reviewing. 19 | - Extensive knowledge of the Python language and specifically, version 3.6 with fstrings. 20 | - Basic knowledge of how ` Python Sanic` works as that is what we are using for the API. 21 | - Basic knowledge about Heroku and how it works. 22 | - Used the API before and understand its structure. 23 | 24 | 25 | To apply for this, and tell me that you fulfill the above requirements, please create an issue and I'll get in touch with you. 26 | 27 | # What about helping out in the moderation of Github issues? 28 | We don't need a team for that at the moment, but might reach out to active members of the community once we need it. 29 | 30 | # Pull Requests 31 | I put this topic right at the bottom as it is the least common. The only reason why a pull request should be created **in this repository** is for outdated information. 32 | 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # About the API 2 | This is a Brawl Stars (Game by Supercell) API (details below) 3 | ```json 4 | { 5 | "base_url": "https://brawl-stars.herokuapp.com/api", 6 | "endpoints": [ 7 | "players/:tag", 8 | "bands/:tag", 9 | "events" 10 | ], 11 | "github":"https://github.com/brawlstarsAPI/api" 12 | } 13 | ``` 14 | The above JSON object can be retrieved by doing a `GET` Request to either `/` or `/api` 15 | 16 | All requests should be `GET` requests 17 | 18 | Every response by the API is a JSON object. In any case we respond with a non-JSON object, please [create an issue](https://github.com/brawlstarsAPI/api/issues) so we can fix the error. 19 | 20 | # Errors 21 | When the API provides an error, it uses the following format: 22 | 23 | ```json 24 | { 25 | "error": true, 26 | "message": "A message describing the error", 27 | "code": 504, 28 | "details": "Additional details, may or may not be provided by the API" 29 | } 30 | ``` 31 | 32 | # Error Codes 33 | | Code | Definition | Notes | 34 | | ------------- | ------------- | ------------- | 35 | | 200 | OK | | 36 | | 400 | Bad Request | You might be missing the `User-Agent` header, refer below | 37 | | 403 | Forbidden | You might be blocked by the API, refer below | 38 | | 404 | Invalid Endpoint | | 39 | | 404 | Invalid Tag | | 40 | | 500 | Unexpected Error | This is an error on our side and we will fix it ASAP. This would have a details field. | 41 | | 504 | API Down | | 42 | 43 | # What about Authentication? 44 | We have not started using API Keys on the API but we might if too many people start using the API. 45 | 46 | For now, please provide a `User-Agent` header in your request with the name of your application (This will be made necessary in the next API Update) 47 | 48 | Users without the `User-Agent` header will be returned with a `400 Bad Request` once this is implemented. 49 | 50 | For example: `User-Agent: https://www.brawlstarsstats.com` 51 | 52 | This would allow us to identify, and possibly contact the people using the API before we blacklist the IP Address. 53 | 54 | # Blacklisted 55 | **I'm blacklisted! What can I do?** 56 | To appeal, [create an issue](https://github.com/brawlstarsAPI/api/issues) on this github repository with the following details: 57 | - Your value in the User-Agent header 58 | - Reason why your application made that many requests to the API 59 | - How you fixed that issue 60 | 61 | If, for some reason, you did not set a `User-Agent` header and got blacklisted, there is no way to appeal as of now (unless you would like to let everyone see your IP Address) 62 | -------------------------------------------------------------------------------- /showcase/wrappers.md: -------------------------------------------------------------------------------- 1 | # Wrappers: 2 | Below are all the wrappers for the API. 3 | These are wrappers that have been made to help make the API more user friendly. 4 | 5 | ## Python 6 | ### abrawlpy 7 | Source: https://www.github.com/SharpBit/abrawlpy 8 | Author: SharpBit#9614 9 | Additional Notes: Easy to use Python async client to get all statistics from the API. 10 | 11 | ### brawlstars 12 | Source: https://www.github.com/umbresp/brawlstars 13 | Author: Viktinye#9711 14 | Additional Notes: Easy to use, async and sync, clean interface 15 | --------------------------------------------------------------------------------