fiveserver icon indicating copy to clipboard operation
fiveserver copied to clipboard

REST api to retrieve live stats

Open rik297981 opened this issue 3 years ago • 9 comments

Could I have a guide on this feature? Inside the README file the function is listed: REST api to retrieve live stats

Where do i find API? can you tell me how to apply it in a friends' blog? An external guide would also be enough for me. Thanks for your fantastic work ... I love pes, always

rik297981 avatar Mar 04 '21 07:03 rik297981

What is meant here is that there is a "/stats" resource on the admin interface, that reports what rooms are created, players in the rooms, and current ongoing matches with live scores. Check out the admin interface, which would be here (if you haven't modified the port): Fiveserver: https://{your-server-host}:8181/ Sixserver: https://{your-server-host}:8191/

juce avatar Mar 05 '21 04:03 juce

Thanks juce for your reply. very happy for this.

yes I had read the guide and saw the / stats interface

what I was wondering:

is it possible to create an accessible html interface for server members? just like that of the registration field. example Sixserver: https: // {your-server-host}: 8179 /

where it is reported sorted in tabs

/stats /user - with their related profiles /user online

it would be great for server friends to be able to see this information, which they can make jokes about or start playing with enthusiasm

I really hope that you can also insert ratings, in that case it would be great to also have /statsrating with updated rankings.

the desire to meet would increase even more

moreover, everything is seen by all participants on the server, shared without having to touch the administrative side; without necessarily having to go into pes and the server to see your statistics and those of your friends

rik297981 avatar Mar 05 '21 16:03 rik297981

so there is something like that... it's a so-called private interface that has "/stats" and "/users/online" and a few other things. If you are on the server, and you query it for example with curl, like this: curl http://localhost:8192/

That interface is only accessible via localhost or 127.0.0.1 , so it's not visible outside - the idea being that you'd have an actual real web-site hosted on the same server, and that web site would query sixserver for live statistics and display them in a nice way with graphics, team logos and so for.

It is simple enough to modify or remove the localhost/127.0.0.1 restriction, if needed.

juce avatar Mar 05 '21 16:03 juce

So can't you make an html page like the one for registration where it is reachable by everyone? Without the need for graphics ... But only the keys that call up the tabs. Without having to do the web separately?

rik297981 avatar Mar 05 '21 17:03 rik297981

An html page ... Like the one inserted in the web and web6 folder. Accessible from the same server where your code is hosted on a certain port that shows the Info / stats / profiles / profiles online .. Like this: 12efc482-37f5-11e7-8625-0fcc11b03e78

0a27dac4-37f5-11e7-8506-ca28a0252638

it would be beautiful and implemented immediately, for all friends.

Even without the nice graphics, only card with the names of what it shows as per the questioned card

rik297981 avatar Mar 05 '21 17:03 rik297981

Master ... thank you for everything. I have to ask you:

how to change or remove localhost / 127.0.0.1 restriction,?

where should I do this from? and how?

I would like to have ip: 8192 accessible to the public to show the statistics to the participants

rik297981 avatar Apr 09 '21 08:04 rik297981

Master ... thank you for everything. I have to ask you:

how to change or remove localhost / 127.0.0.1 restriction,?

where should I do this from? and how?

I would like to have ip: 8192 accessible to the public to show the statistics to the participants

just change the interface='127.0.0.1' to interface=config.interface in the following line and files

for pes5/we9/le

https://github.com/juce/fiveserver/blob/master/tac/fiveserver.tac#L131

for pes6/we2007

https://github.com/juce/fiveserver/blob/master/tac/sixserver.tac#L131

that should be enough

moth1995 avatar Apr 09 '21 16:04 moth1995

of course it will depends on you to secure that port later...

moth1995 avatar Apr 09 '21 16:04 moth1995

An html page ... Like the one inserted in the web and web6 folder. Accessible from the same server where your code is hosted on a certain port that shows the Info / stats / profiles / profiles online .. Like this: 12efc482-37f5-11e7-8625-0fcc11b03e78

0a27dac4-37f5-11e7-8506-ca28a0252638

it would be beautiful and implemented immediately, for all friends.

Hi , how do I do this on my server , can you show me the files and codes so I can get an idea ? thanks

tonilp avatar Nov 23 '21 19:11 tonilp