SharpBit / brawlstats

(A)sync Python API wrapper for the Brawl Stars API
https://brawlstats.rtfd.io/
MIT License
99 stars 24 forks source link

I have an issue with the client = brawlstats.Client(token='example_my_token') code #59

Closed jiacheng-0 closed 4 years ago

jiacheng-0 commented 4 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. i.e. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

I have tried using my brawlstar API key with postman and it works.

Additional context Add any other context or screenshots about the feature request here.

SharpBit commented 4 years ago

What's the error? I can't help you if you don't give me any information

jiacheng-0 commented 4 years ago

I have tried using my brawlstar API key with postman and it works. However it doesn't work when I'm trying to use it with python code

import brawlstats
client = brawlstats.Client(token=r'') # i have my actual token here
print(client)
print(client.get_constants())
# above 2 lines doesn't work

Is brawl stats API down? Or is brawl stars main API not able to be accessed at this period? My postman request with bearer token is fine. Working well.

SharpBit commented 4 years ago

U gotta copy paste what error you're getting otherwise I can't help you

SharpBit commented 4 years ago

@jiacheng-0 please don't talk about your own issue in issue #58- use this one

Based on your screenshot, try making it a positional argument. It should still work with a keyword argument but for some reason it seems like it doesn't, so remove tag= when calling client.get_profile()

jiacheng-0 commented 4 years ago

@jiacheng-0 please don't talk about your own issue in issue #58- use this one

Based on your screenshot, try making it a positional argument. It should still work with a keyword argument but for some reason it seems like it doesn't, so remove tag= when calling client.get_profile()

I have tried it and it works for now, thanks! Seems like hashtag # or %23 is not needed in the profile tag parameters as well. Interesting. Btw is there another more informal way of messaging you?