umbresp / brawlstars Goto Github PK
View Code? Open in Web Editor NEWClient for interacting with the Brawl Stars API.
Home Page: https://brawlapi.cf
License: MIT License
Client for interacting with the Brawl Stars API.
Home Page: https://brawlapi.cf
License: MIT License
Traceback (most recent call last):
File "C:\Python39\lib\site-packages\brawlstars\client.py", line 66, in get_player
raise HTTPError(resp.status_code)
File "C:\Python39\lib\site-packages\brawlstars\errors.py", line 29, in init
self.error = 'An error occurred. Status: ' + code
TypeError: can only concatenate str (not "int") to str
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\prog\PycharmProjects\untitled3\brawltracker.py", line 4, in
player = client.get_player(tag="Q8P2ULP")
File "C:\Python39\lib\site-packages\brawlstars\client.py", line 72, in get_player
raise Timeout()
brawlstars.errors.Timeout
Process finished with exit code 1.
code must be str?
from .errors import *
- don't use wildcard importsself.baseUrl = 'http://brawlstars-api.herokuapp.com/api/'
- should be self.base_url__del__
...?if tag is None: raise MissingArg('tag')
- this is really useless, just don't make it an optional params and python handles it for youplayer = Player(data)
return player
i don't see the point of creating another variable here
__str__
except Exception:
- just do except:
am kinda tired atm so this isn't comprehensive, fix all these and ill look at it again
read this SharpBit/brawlstats#1
I don't think invalidarg or httperror for invalid tag is a good idea, a seperate exception should be raised for that.
Your docstrings say brawlstars.ValueError
. However, this is misleading because it's not brawlstars.ValueError, because ValueError is built-in to python. Change brawlstars.ValueError
to just ValueError
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.