retroflex / MMM-BrawlStars

A MagicMirror2 module that shows stats (level, trophies and victories) for players of mobile game Brawl Stars.
MIT License
2 stars 2 forks source link

My Brawlstars module stay blocked on "Loading..." #1

Closed Zherod closed 4 years ago

Zherod commented 4 years ago

Hello,

I don't understand why, but my module MMM-Brawlstars keep saying "Loading...". I have my API token, my usertags to display, but when I want to display it keeping on "Loading...". In the website https://api.starlist.pro/dashboard? , in the website for event webhook, do we have to specify the IP Address of the MagicMirror with a specific port ?

Thx for your answer. Have a good day. Sincerely, Zherod

MathieuGery commented 4 years ago

Hey I Have the same problem. In Discod server it's say you must to wait 1 hours, until you'll be able to use the api key. I will try ...

MathieuGery commented 4 years ago

I have the same error maybe i will make a pull request. I think the api has changed since then

MathieuGery commented 4 years ago

Hello,

I don't understand why, but my module MMM-Brawlstars keep saying "Loading...". I have my API token, my usertags to display, but when I want to display it keeping on "Loading...". In the website https://api.starlist.pro/dashboard? , in the website for event webhook, do we have to specify the IP Address of the MagicMirror with a specific port ?

Thx for your answer. Have a good day. Sincerely, Zherod

Ok i found it it's the baseURL of the api changed, i will make pull request. If you want to change it manualy you could. File node_helper.js change baseURL to const baseURL = 'https://api.starlist.pro/v1/player?tag=';

retroflex commented 4 years ago

@Zherod @MathieuGery For some reason I never got notifications on this issue or the pull request. Anyhow, I have merged the PR now, so it should work. Thanks!

MathieuGery commented 4 years ago

Hello thanks no problem. Unfortunately the unofficial api don't support this route anymore. I'm working on code with the original api. I will make a pull request if it works. Thanks a lot for your work <3

retroflex commented 4 years ago

@MathieuGery Great! Then you should read my first reponse on the forum (which I wrote before I saw your PR): https://forum.magicmirror.builders/post/74757

In short, the problem with the official API is that you have to set a fixed IP address.

MathieuGery commented 4 years ago

I will reply on that site but since you use your public ip adress it doesn’t change. It worked for me. Or you can host your MM on a VPS like i do

retroflex commented 4 years ago

@MathieuGery The norm is that public IP's for home use change. Maybe not often though. Could work for years or a day.

MathieuGery commented 4 years ago

In france ip adress change only if you change provider

retroflex commented 4 years ago

Just curious, is that regulated by law or why is that way? In Sweden you often don't get an external IP address at all, you are instead behind the ISP's NAT. Some ISP's provide an external IP address, but that can change. So everyone who's running a server of some sort have to use a dynamic DNS service.