-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Switch mpgstats API to new mlnstats API #134
Comments
@LittleLama : About new API usage (https://api.mlnstats.com/leagues/[LeagueName]), what is the new endpoint for https://www.mpgstats.fr/json/leagues.json (containing timestamp refresh) ? Many thanks |
New endpoint is api.mlnstats.com/builds
Le mer. 18 déc. 2019 à 13:55, Alix Lourme <notifications@github.com> a
écrit :
… @LittleLama <https://github.com/LittleLama> : About new API usage (
https://api.mlnstats.com/leagues/[LeagueName]), what is the new endpoint
for https://www.mpgstats.fr/json/leagues.json (containing timestamp
refresh) ?
Many thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#134?email_source=notifications&email_token=ABGAOD7PR3PPQUJGXSO3J73QZIMRJA5CNFSM4J3BQAQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHGAQNY#issuecomment-567019575>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGAOD43KUOABJIYDFEIV4LQZIMRJANCNFSM4J3BQAQA>
.
|
Many thanks !! I work on API update, but it would be not very simple. |
@LittleLama : I will implement the new API like that, but I have some remarks (perhaps this is not a final implementation, ....). This is in no way a criticism or request for change, just feedback about usage. [1] In some Arrays (players list, player's stats by day), the items could be different types. First element is id (type int), the second element is the value/bean/object. It breaks (a little) the JSON key/value pairs principle and could occurs some difficulties in object deserialization (many language does not like when a list/array does not contain items of same type). [2] The player stats by day is directly under player, and not under (average) stats like previous API. Sample with these 2 points:
|
The format you point is a JS Map object. Really usefull to keep trace of
changes in the file and preserve unicity.
Yes stats are now only stats, perfs are basis of stats but stored in its
own property as a Map object. Negative days (first element) are about past
season, positive one's are about current season.
Le mer. 18 déc. 2019 à 22:19, Alix Lourme <notifications@github.com> a
écrit :
… @LittleLama <https://github.com/LittleLama> : I will implement the new
API like that, but I have some remarks (perhaps this is not a final
implementation, ....). This is in no way a criticism or request for change,
just feedback about usage.
[1] In some Arrays (players list, player's stats by day), the items could
be different types. First element is id (type int), the second element is
the value/bean/object. It breaks (a little) the JSON key/value pairs
principle and could occurs some difficulties in object deserialization
(many language does not like when a list/array does not contain items of
same type).
[2] The player stats by day is directly under player, and not under
(average) stats like previous API.
Sample with these 2 points:
[
1155, <--- ID / int as first array item
{ <--- bean as second array item
"n": "Neymar",
...
"s": {
"g": 7,
...
"pa": 9
},
"p": [ <--- Stats by days are not "under" previous stat bloc
[
-36, <--- Same "int" & "bean" in same array
{
"n": 7,
"e": 3083,
"g": 1
}
],
[
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#134?email_source=notifications&email_token=ABGAOD3CHDIV34U4LIVUEJ3QZKHRFA5CNFSM4J3BQAQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHHQZAY#issuecomment-567217283>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGAOD4PJ7BCZKPE3TECUHDQZKHRFANCNFSM4J3BQAQA>
.
|
Hi @LittleLama, rencently the API format has changed. Now start with Sample with https://api.mlnstats.com/leagues/Premier-League:
It will kept like that ? (The parsing change a little in this case) Many thanks |
Yeah I know. It doesnt really please to me. It makes no difference in JS
language but I need to check pros and cons of this format. Will be done
really quickly.
Le dim. 29 déc. 2019 à 16:28, Alix Lourme <notifications@github.com> a
écrit :
… Hi @LittleLama <https://github.com/LittleLama>, rencently the API format
has changed. Now start with " (and not { as JSON format) and all
double-quotes are escaped.
Sample with https://api.mlnstats.com/leagues/Premier-League:
"{\"bD\":\"2019-12-29T04:30:19.271Z\",\"mL\": ...
It will kept like that ? (The parsing change a little in this case)
Many thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#134?email_source=notifications&email_token=ABGAODZBUXL47O3GXPI7IVTQ3C6V5A5CNFSM4J3BQAQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHZB4MQ#issuecomment-569515570>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGAOD7TLMPYKQ2YOQONGILQ3C6V5ANCNFSM4J3BQAQA>
.
|
@LittleLama Ok, thanks. I will wait until any adapations. But I pomote pure JSon format, more common 😁. |
Yes me too, consider it will be done like that.
Le dim. 29 déc. 2019 à 18:01, Alix Lourme <notifications@github.com> a
écrit :
… Will be done really quickly
@LittleLama <https://github.com/LittleLama> Ok, thanks. I will wait until
any adapations. But I pomote pure JSon format, more common 😁.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#134?email_source=notifications&email_token=ABGAODZ73J2XIHTCLFEDL63Q3DJWJA5CNFSM4J3BQAQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHZDZFA#issuecomment-569523348>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGAOD6FNJ7WKIDEPUSTEGDQ3DJWJANCNFSM4J3BQAQA>
.
|
@LittleLama Thx 👍 |
See in @LittleLama in #98, mpgstats API will be updated.
Old endpoint:
New endpoint:
Content seems change a little, to analyse.
The text was updated successfully, but these errors were encountered: