Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST api to retrieve live stats #8

Open
rik297981 opened this issue Mar 4, 2021 · 9 comments
Open

REST api to retrieve live stats #8

rik297981 opened this issue Mar 4, 2021 · 9 comments

Comments

@rik297981
Copy link

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

@juce
Copy link
Owner

juce commented Mar 5, 2021

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/

@rik297981
Copy link
Author

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

@juce
Copy link
Owner

juce commented Mar 5, 2021

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.

@rik297981
Copy link
Author

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
Copy link
Author

rik297981 commented Mar 5, 2021

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
Copy link
Author

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

@moth1995
Copy link

moth1995 commented Apr 9, 2021

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
Copy link

moth1995 commented Apr 9, 2021

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

@tonilp
Copy link

tonilp commented Nov 23, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants