Giter Club home page Giter Club logo

brawlstats's People

Contributors

0dminnimda avatar erickang21 avatar fourjr avatar kjkui avatar kyb3r avatar nihaals avatar robinmahieu avatar sharpbit avatar soumil-07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

brawlstats's Issues

Realtime analysis of player data with advanced statistics.

Feature Request: Realtime data gathering

I was looking through the possibilities of the API and came across (maybe) a way to gather data in realtime because the battle log is limited to 25 items at most (referring to the data returned by the API), and tracking a battles for about 1.5 hours of play can easily surpass the 25 battles limit. I would have to poll the data and keep a track of the additions and maybe obtain an extended battle log of some sort for analysis. (I haven't thought much of the analysis part yet)

On that note another thing crossed my mind: are there any limits imposed on the number of API calls one IP can do per hour? I didn't find any proper details in the documentation. All that I found was located here.

Misc data

not correct date is sent on the reset of the store and season!

Avoid RateLimitError

First of all, thanks a lot for providing this wrapper, it is great!

I must say, I am relatively new to the whole "async" stuff but I do not really understand its purpose when there anyway seems to be a strict limit on the rate of requests to the api ("RateLimitError").

Is there a way to avoid this error by limiting the number of request to the api automatically, such that a line of code like this

players = await asyncio.gather(*(client.get_player(player.tag) for player in club.members))

would work (even though it would be slow)?

Thanks a lot and keep up the good work!

unnecessary print of brawlers

dictionary containing brawler names and IDs is automatically printed to console upon client initialisation. this bug was introduced very recently and takes place at line 30 in brawlstats/utils.py in set_brawlers()
sorry for not fixing myself - i didn't want to create a fork purely for this bug

also, nice repo. has been very useful for me

NotFoundError: An incorrect tag has been passed.

Describe the bug
brawlstats.errors.NotFoundError being raised while using get_club() function of brawlstats.officialapi.models.Player object.

Full Code
club = await player.get_club()
The rest of the code is not needed as it doesn't work wherever used.

Error

Traceback (most recent call last):
  File "path", line 83, in wrapped
    ret = await coro(*args, **kwargs)
  File "path", line 178, in profile
    club = await player.get_club()
  File "path.../python3.8/site-packages/brawlstats/officialapi/core.py", line 182, in _aget_model
    data = await self._arequest(url)
  File "path.../python3.8/site-packages/brawlstats/officialapi/core.py", line 140, in _arequest
    data = self._raise_for_status(resp, await resp.text())
  File "path.../python3.8/site-packages/brawlstats/officialapi/core.py", line 110, in _raise_for_status
    raise NotFoundError(code)
brawlstats.errors.NotFoundError: An incorrect tag has been passed.

Additional context
Python Version: 3.8.1
brawlstats Version: 3.0.3
OS (and version): Ubuntu 16.04

Player.3_vs_3_victories attribute starts with number

Describe the bug
In the OfficialAPI Player object there is an attribute "3_vs_3_victories". But python doesn't allow variable names to start with numbers. So it raises SyntaxError.

Full Code
No code needed for this

Expected behavior
Return amount of 3v3 victories.

Actual behavior
Raises SyntaxError

Additional context
Python Version: 3.7
brawlstats Version: v3.0.1.post1

power play

if it's possible , can you add to get_rankings , a "power_play" ranking

```collecting aiohttp Error: could not find the version that satisfies the requirments aiohttp<3.6.0>=3.5.2 (from brawlstats)``` It says (in console) when i install the cog (in red v2 bot) from https://github.com/Gr8z/Legend-Cogs > Brawlstars Cog.

Describe the bug
A clear and concise description of what the bug is.

Full Code
Upload to https://gist.github.com if the code is too long.

Expected behavior
A clear and concise description of what you expected to happen.

Actual behavior
A clear and concise description of what actually happened along with a full traceback if applicable.

Additional context
Python Version:
brawlstats Version:
OS (and version):

tbh your wrap per sucks

  1. loop and session should be grabbed as a kwarg in Client init πŸ‘
  2. __str__ should be a method for player and band, etc πŸ‘
  3. self.timeout = options.get('timeout') should have a default of 5 πŸ‘
  4. Tags should be pre-checked instead of polling the API and getting an invalid tag πŸ‘
  5. from .errors import * should not be a wildcard import πŸ‘
  6. more of a personal preference, all errors should include endpoint that includes tag πŸ‘
band = Band(raw_data, camel_killer_box=True)
return band

what's the use of creating a var here πŸ‘
8. why specify camel_killer_box=True) all the time? why not just create a box base class for your wrapper where you specify that in the init? πŸ‘
9. get_player should be alias for get_profile πŸ‘
10. timeout: Optional[int] Quits requests to the API should be **timeout in docstrings πŸ‘
11. get the request code for unauthorized 401? πŸ€”
think hope that's it
12. in __init__.py:

from .core import *
from .errors import *
from .utils import API

import utils isn't needed here? πŸ‘
13. send only one message in the dpy cog example (readme.md) πŸ‘
14. in all docstrings, for kwargs use **varname instead of varname πŸ‘
15. Get your token by DMing Zihad#6591 on Discord or ask in theΒ API Server. update plox πŸ‘

Command "python setup.py egg_info" failed with error code 1

Describe the bug

pip install brawlstats

Collecting brawlstats
  Using cached https://files.pythonhosted.org/packages/bf/09/279c766f71ed6d8696b4b8ce73994560d497ae2b39c5f451452f61c5b88d/brawlstats-2.2.3.tar.gz
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/brawlstats.egg-info
    writing pip-egg-info/brawlstats.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/brawlstats.egg-info/dependency_links.txt
    writing requirements to pip-egg-info/brawlstats.egg-info/requires.txt
    writing top-level names to pip-egg-info/brawlstats.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/brawlstats.egg-info/SOURCES.txt'
    reading manifest file 'pip-egg-info/brawlstats.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pip-egg-info/brawlstats.egg-info/SOURCES.txt'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-wragy7qc/brawlstats/setup.py", line 48, in <module>
        del data['info']
    KeyError: 'info'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-wragy7qc/brawlstats/

Additional context

Ubuntu 18.04.2
Python 3.6.7
pip 19.0.3
setuptools 40.8.0

What could be the problem?

caching data for 3 minutes

Is your feature request related to a problem? Please describe.
api requires caching

Describe the solution you'd like
add caching

Describe alternatives you've considered
none, api requires it

Additional context
none really

Python 3.6 - No such file or directory

Hello, Im using Pydroid3 running python 3.6 and when I try to load BrawlStats it gives the error 2 "No such file or directory"

I will atach an image with that error
img_20190227_231716

[Errno 101] Cannot connect to host brawlapi.cf:443

Describe the bug

Traceback (most recent call last):
  File "lib/aiohttp/connector.py", line 601, in _create_direct_connection
    local_addr=self._local_addr)
  File "/usr/lib/python3.5/asyncio/base_events.py", line 695, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.5/asyncio/base_events.py", line 682, in create_connection
    yield from self.sock_connect(sock, address)
  File "/usr/lib/python3.5/asyncio/selector_events.py", line 402, in sock_connect
    return (yield from fut)
  File "/usr/lib/python3.5/asyncio/futures.py", line 363, in __iter__
    return self.result()  # May raise too.
  File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/usr/lib/python3.5/asyncio/selector_events.py", line 407, in _sock_connect
    sock.connect(address)
OSError: [Errno 101] Network is unreachable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "lib/aiohttp/connector.py", line 304, in connect
    yield from self._create_connection(req)
  File "lib/aiohttp/connector.py", line 578, in _create_connection
    transport, proto = yield from self._create_direct_connection(req)
  File "lib/aiohttp/connector.py", line 624, in _create_direct_connection
    (req.host, req.port, exc.strerror)) from exc
aiohttp.errors.ClientOSError: [Errno 101] Can not connect to brawlapi.cf:443 [Network is unreachable]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "lib/discord/ext/commands/core.py", line 50, in wrapped
    ret = yield from coro(*args, **kwargs)
  File "/home/newbot/labot/Red-DiscordBot/cogs/labs.py", line 25, in club
    club1 = await self.bs.get_club("V9GRP2C")
  File "/home/newbot/.local/lib/python3.5/site-packages/brawlstats/core.py", line 96, in _aget_model
    data, resp = await self._arequest(url)
  File "/home/newbot/.local/lib/python3.5/site-packages/brawlstats/core.py", line 83, in _arequest
    async with self.session.get(url, timeout=self.timeout, headers=self.headers) as resp:
  File "lib/aiohttp/client.py", line 565, in __aenter__
    self._resp = yield from self._coro
  File "lib/aiohttp/client.py", line 198, in _request
    conn = yield from self._connector.connect(req)
  File "lib/aiohttp/connector.py", line 314, in connect
    .format(key, exc.strerror)) from exc
aiohttp.errors.ClientOSError: [Errno 101] Cannot connect to host brawlapi.cf:443 ssl:True [Can not connect to brawlapi.cf:443 [Network is unreachable]]

Full Code

import discord
from discord.ext import commands
from .utils import checks 
import brawlstats
import asyncio

class LABS:
    def __init__(self, bot):
        self.bot = bot
        self.bs = brawlstats.Client('token', is_async=True)
    @commands.command(pass_context = True)
    async def club(self, ctx):
        club = await self.bs.get_club("VP2RL8P")
        embed = discord.Embed(description = club.description, colour = discord.Colour.blue())
        embed.set_author(name = club.name, icon_url = club.badge_url)
        embed.add_field(name = "Status", value = club.status)
        embed.add_field(name = "Members", value = str(club.members_count) + "/100")
        embed.add_field(name = "Status", value = club.status)
        await self.bot.say(embed = embed)
def setup(bot):
    bot.add_cog(LABS(bot))

Expected behavior
Connect to the API and retrieve data

Actual behavior
Can't connect, sync client works.

x3vs3_victories vs team_victories

What's the difference between v3v3 vs team_victories in the player object? For me, the number is the exact same. I think they mean the same thing, but please do correct me if I'm wrong.

I was wondering if this it's necessary to have both attributes.

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

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.

Leaderboard is not currently working

Traceback (most recent call last):
  File "brawlstars.py", line 20, in <module>
    loop.run_until_complete(main())
  File "C:\Users\SharpBit\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 568, in run_until_complete
    return future.result()
  File "brawlstars.py", line 17, in main
    lb = await client.get_leaderboard('players', 5)
  File "C:\Users\SharpBit\AppData\Local\Programs\Python\Python37\lib\site-packages\brawlstats\core.py", line 129, in get_leaderboard
    return Leaderboard(response['players'])
  File "C:\Users\SharpBit\AppData\Local\Programs\Python\Python37\lib\site-packages\brawlstats\core.py", line 12, in __init__
    super().__init__(*args, **kwargs)
  File "C:\Users\SharpBit\AppData\Local\Programs\Python\Python37\lib\site-packages\box.py", line 301, in __init__
    for k, v in args[0]:
ValueError: too many values to unpack (expected 2)

API down?

Hey, first of all thanks for the nice package.
But since this morning it seems to be, that the API is down?
Is there anything we can do to help? Are you guys also the devs behind the API?

Thanks πŸ™‚

Long wait time to fetch constants.json from heroku

The Issue

In this line, the program waits a while to connect and fetch the 5 MB constants.json file. Its fine for servers but can be a pain for slow connections.

Suggested Modifications

Maybe some way to locally cache the file in the running directory of the script would definitely help.
I understand that it only runs once per the initialisation of the client object but a local cache of the file would be a nice thing to have. (Assuming its updated once per month?)

no access to general brawler information

** Is your feature request related to a problem? Please describe. **
there is no way to learn about brawlers in the module. although in the official api there is such an opportunity

** Describe the solution you'd like **
add get_brawlers function with which you can get information about brawlers

** Describe alternatives you've considered **
send requests to BS api yourself

** Additional context **
do it please :(

Every brawler in the rankings is now invalid

client.get_rankings(ranking = "brawlers", region=None,limit = 200, brawler='any_brawler_name')

and always the same output

File "C:\Users*****\AppData\Local\Programs\Python\Python38\lib\site-packages\brawlstats\core.py", line 287, in get_rankings
raise ValueError('Invalid brawler.')
ValueError: Invalid brawler.

that code worked correctly until update 4.0.4 i guess

Response 401 when running example

Running the example, i.e. instantiating client with a newly generated token and then any command afterwards leads to Unauthorized error.

import brawlstats as bs
client = bs.Client("token")
player = client.get_leaderboard("players")

This is for pip-installed brawlstats and python 3.7.1

AttributeError: __enter__

i get that message every time i want to get client

File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(self._args, **self._kwargs)
File "
***.py", line 113, in ****
client = brawlstats.Client(token=cT)
File "/home/ubuntu/.local/lib/python3.8/site-packages/brawlstats/core.py", line 76, in init
brawlers_info = self.get_brawlers()
File "/home/ubuntu/.local/lib/python3.8/site-packages/brawlstats/core.py", line 355, in get_brawlers
return self._get_model(self.api.BRAWLERS, model=Brawlers)
File "/home/ubuntu/.local/lib/python3.8/site-packages/brawlstats/core.py", line 190, in _get_model
data = self._request(url)
File "/home/ubuntu/.local/lib/python3.8/site-packages/brawlstats/core.py", line 155, in _request
with self.session.get(url, timeout=self.timeout, headers=self.headers) as resp:

what's causing that problem?

Client constructor accepts :url:

Is your feature request related to a problem? Please describe.
When I'd like to test with for example, a self hosted API, the wrapper does not support it : (

Describe the solution you'd like
A url kwarg in Client constructor to use instead of http://brawlapi.cf/api

Errors occur when upgrading from version 4.0.0 to 4.0.1

Describe the bug
version 4.0.1 made a mistake in the code.

Full Code
`import brawlstats as bs

TOKEN = "some token"

my_tag = "2q0ql2pl".upper()

client = bs.Client(TOKEN)

me = client.get_player(my_tag)

print(me.raw_data['tag'])`

Expected behavior
output "#2Q0QL2PL"

Actual behavior
Traceback (most recent call last):
File "test.py", line 9, in
me = client.get_player(my_tag)
File "C:\Program Files\Python38\lib\site-packages\brawlstats/utils.py", line 101, in wrapper
return func(*new_args, **new_kwargs)
File "C:\Program Files\Python38\lib\site-packages\brawlstats/core.py", line 205, in get_player
return self._get_model(url, model=Player)
File "C:\Program Files\Python38\lib\site-packages\brawlstatss/core.py", line 189, in _get_model
return model(self, data)
TypeError: init() takes 1 positional argument but 3 were given

Additional context
Python Version: 3.8.2
brawlstats Version: 4.0.1
OS (and version): it doesn't matter since it doesn’t work both on my hosting and on my computer (after upgrading from 4.0.0 to 4.0.1)

Remove generator of ips

When we need to create a brawl stars api key, we can add ip so as not to give access to the api key to anyone. But you can't change a single detail of the key. And the library generate som RANDOM IP so we are forced to create another api key. It's really annoying.

Brawler Gadgets

Currently you can only find the Star Power of a Brawler in this wrapper, but according to the official API you can already query the Gadgets. It would be good if you add the gadgets to the brawlers.

Installation error

Describe the bug
While installing an error arises.

Full Code
I did -pip install brawlstats
Collecting brawlstats
Using cached https://files.pythonhosted.org/packages/1f/15/b40456991cc1ad21932edb45231ff4b2ac473c1d9574499b93975e
f36dcc/brawlstats-2.3.8.tar.gz
Collecting aiohttp<3.6.0,>=3.5.2 (from brawlstats)
ERROR: Could not find a version that satisfies the requirement aiohttp<3.6.0,>=3.5.2 (from brawlstats) (from vers
ions: 0.1, 0.2, 0.3, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.7.0, 0.7.1
, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.12
.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.14.2, 0.14.3, 0.14.4, 0.15.0, 0.15.1, 0.15.2, 0.15.3, 0.16.0, 0.16.1, 0.16.2,
0.16.3, 0.16.4, 0.16.5, 0.16.6, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.17.4, 0.18.0, 0.18.1, 0.18.2, 0.18.3, 0.18.4, 0.
19.0, 0.20.0, 0.20.1, 0.20.2, 0.21.0, 0.21.1, 0.21.2, 0.21.4, 0.21.5, 0.21.6, 0.22.0a0, 0.22.0b0, 0.22.0b1, 0.22.0b
2, 0.22.0b3, 0.22.0b4, 0.22.0b5, 0.22.0b6, 0.22.0, 0.22.1, 0.22.2, 0.22.3, 0.22.4, 0.22.5, 1.0.0, 1.0.1, 1.0.2, 1.0
.3, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 2.0.0r
c1, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.6.post1, 2.0.7, 2.1.0, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4,
2.2.5, 2.3.0a1, 2.3.0a2, 2.3.0a4, 2.3.0, 2.3.1a1, 2.3.1, 2.3.2b2, 2.3.2b3, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.3.6, 2.3.7
, 2.3.8, 2.3.9, 2.3.10, 3.0.0b0)
ERROR: No matching distribution found for aiohttp<3.6.0,>=3.5.2 (from brawlstats)

Expected behavior
I thought it would install but error arises

Additional context
Python Version: Python 2.7.12
brawlstats Version:
OS (and version): Ubuntu 16.04

Problem with installation

I have a problem installing the API.
I tried installing the API on a raspberry pi 4 with Raspbian operating system. When I ran the command "pip install brawlstats" I kept getting this error:
Command "python setup.py egg_info" failed with error code 1 in / tmp / pip-req-build-zi_9Us /

Can anyone help me?

not available in brawl stats

hello brother, I wanted to create a bot for buying gems on telegram for brawl stars, I am from Uzbekistan, it is very difficult to buy gems in Uzbekistan, so I wanted to create a telegram bot, it would be great if you could help me, if you could release the tutorials on brawl stats to youtube, it would be easier to learn, thanks in advance

It looks like the file is not found.

Describe the bug
When I installed developer version and I tried to run my Discord bot, it gets an error:

Traceback (most recent call last):
  File "C:\Users\USER\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\ext\commands\bot.py", line 580, in _load_from_module_spec
    setup(self)
  File "C:\Users\USER\Desktop\developer\bestbot\cogs\brawl.py", line 148, in setup
    bot.add_cog(BrawlStars(bot))
  File "C:\Users\USER\Desktop\developer\bestbot\cogs\brawl.py", line 19, in __init__
    self.client = brawlstats.Client('API KEY', is_async=True)
  File "C:\Users\USER\AppData\Local\Programs\Python\Python36\lib\site-packages\brawlstats\core.py", line 62, in __init__
    self.api = API(options.get('base_url'))
  File "C:\Users\USER\AppData\Local\Programs\Python\Python36\lib\site-packages\brawlstats\utils.py", line 23, in __init__
    with open(os.path.join(path, 'constants.json')) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages\\brawlstats\\constants.json'

Additional context

Python Version: 3.6.6
brawlstats Version: 2.3.11
OS (and version): Windows 10 (Version 10.0.17134.885)

Asyncio Lock is not awaited

Describe the bug
Currently https://github.com/SharpBit/brawlstats/blob/master/brawlstats/core.py#L157 uses a new instance of Lock when trying to avoid rate limitation. Unfortunately, this couldn't work because you need to keep the same instance of the Lock between function calls.

See https://docs.python.org/3/library/asyncio-sync.html#asyncio.Lock

Full Code
N/A

Expected behavior
The Lock instance is preserved between calls.

Actual behavior
A new instance of Lock is created on every call, making it useless.

Proposed solution
When instantiating Client, add a attribute self.lock = asyncio.Lock() and later use async with self.lock:

Additional context
N/A

Suggestion to remove the replacement of O's with 0's

In the following line

tag = tag.strip('#').upper().replace('O', '0')
can the replacement of O's with 0's be dropped? Because it works for the API but if I take the player tag as a parameter it just breaks any other part of the script I want to use the player tag in. The API anyway returns a 0 and as there is already a check for the valid characters in place in the following line
invalid = [c for c in tag if c not in allowed]
I recommend removing the O replacement with 0 as it kind of feels redundant. That way I can only resolve tag messups with not found error and a simple message like your tag may be incorrect, the valid characters are 0289PYLQGRJCUV and its a Numeric Zero and not a O.
I got 5 people who messed up their tag like this and pinged me saying that my code is broken.

You can contact me at Sammy#5535 on discord as well if you have any other suggestions as this change maybe good in some cases as well.

Help wanted: More API support

New API endpoints here: https://discordapp.com/channels/501558785152778252/521017779910869032/596971040970768384

What's needed:

  • Functions named get_battle_logs and an update in get_leaderboard arguments+URL building in brawlstats.core.Client with documentation (see other functions' docstrings)
  • View the code in another function such as get_leaderboard and use the same functions, but replacing the logic and URL
  • New classes that inherit brawlstats.models.BaseBox in models.py
  • Use these models for the new functions
  • Local leaderboard requests should still return a Leaderboard object
  • Since we do not have a sample JSON response documented, attribute documentation is not needed yet.
  • Provide support for local leaderboards and battle logs

Your help is appreciated and I will review your PR! If you have questions about what needs to be done, join the API discord server and ask me (SharpBit#5343) or ask in this thread.

Reason why I need help: I am away for the next 2-3 weeks and don't really have time to update the wrapper

Heroku can't install

Describe the bug
I'm trying to host my bot on Heroku, and it fails to install brawlstats

Full Code
requirements.txt

aiohttp==3.4.4
brawlstats==2.3.0
clashroyale==4.0.1
discord-webhook==0.4.1
git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py[voice]
getgist==0.1.2
lxml==4.2.3

Expected behavior
brawlstats should install successfully

Actual behavior
It fails on installing

Collecting brawlstats==2.2.2 (from -r /tmp/build_83abd8b4ec208f6826aa36542e36e247/requirements.txt (line 2))
         Downloading https://files.pythonhosted.org/packages/d1/be/19d70b4dc24e8352fec72fd64dd180de80d07d3540a8d91c7a935fc7a5cd/brawlstats-2.2.2.tar.gz (154kB)
           Complete output from command python setup.py egg_info:
           /app/.heroku/python/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
             warnings.warn(msg)
           running egg_info
           creating pip-egg-info/brawlstats.egg-info
           writing pip-egg-info/brawlstats.egg-info/PKG-INFO
           writing dependency_links to pip-egg-info/brawlstats.egg-info/dependency_links.txt
           writing requirements to pip-egg-info/brawlstats.egg-info/requires.txt
           writing top-level names to pip-egg-info/brawlstats.egg-info/top_level.txt
           writing manifest file 'pip-egg-info/brawlstats.egg-info/SOURCES.txt'
           reading manifest file 'pip-egg-info/brawlstats.egg-info/SOURCES.txt'
           reading manifest template 'MANIFEST.in'
           writing manifest file 'pip-egg-info/brawlstats.egg-info/SOURCES.txt'
           Traceback (most recent call last):
             File "<string>", line 1, in <module>
             File "/tmp/pip-build-q1klefls/brawlstats/setup.py", line 48, in <module>
               del data['info']
           KeyError: 'info'
           
           ----------------------------------------
       Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-q1klefls/brawlstats/

Additional context
Python Version: 3.6.5
brawlstats Version: 2.3.0
OS (and version): I have Windows 7 Pro

trying to get the player icon url

hello, how exactly can I get the url of a user's icon ? it's easy to get the id of the icon, but the docs didn't specify where we can get the url. i use the latest version of brawlstats and python too, and i am a Windows user. thanks for the possible help you'll can provide me

Rewrite tests

Current tests are not sufficient, succeed when they should fail and fail when they should succeed. Should have more library coverage as well.

Fix documentation

Return types in particular (to Optional[]/Union[] instead of "or")

[Suggestion] Pin requirement versions (specifically python-box)

Hello, I am the developer of python-box and see that it is a requirement in this repo and has not been version pinned.
I suggest that you pin it to the max known compatible version in your requirements.txt and/or setup.py file(s):

python-box[all]~=5.4  

Or without extra dependencies

python-box~=5.4

Using ~=5.0 (or any minor version) will lock it to the major version of 5 and minimum of minor version specified.
If you add a bugfix space for 5.4.0 it would lock it to the minor version 5.4.*.

The next major release of Box is right around the corner, and while it has many improvements,
I want to ensure you have a smooth transition by being able to test at your own leisure to ensure your standard user cases do not run into any issues. I am keeping track of major changes, so please check there as a quick overview of any differences.

To test new changes, try out the release candidate:

pip install python-box[all]~=6.0.0rc4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.