Jump to content

Skylords Reborn API


fiki574

Recommended Posts

Quote

What do you mean? 

Do you know difference between an open source and closed source repositories?

Open source: opened source code to everyone to publicly use and contribute
Closed source: closed source code from everyone to only creator and handpicked contributors

So, in our case: 

Open source: frontend applications, and API specifications that can be found in respective README.md files in the respective GitHub repositories.
Closed source: backend applications, actual API implementation of which the source is not publicly available, and will not be ever.

Quote

This being told, I don't want to make enemies but to give feedback as person that wants to use this and finds it usable, but not mostly correct. I find this approach clearer and easily expandable wityh more filters in the future if it's required.

If it's a problem of change it, give me access to a feature branch and I gladly will make the changes and send de merge request (logically the final decison will be yours to apply it) 

No one is trying to make or portray anyone as an enemy, did I give an impression like that in my posts? If yes, I'm sorry, it wasn't my intention.

As said, backend is closed source, and no one is getting access to that anytime soon.

However, the suggestion seems reasonable and will most likely be implemented, not a priority though.

Link to comment
Share on other sites

  • 3 weeks later...
On 12/21/2020 at 3:13 PM, T1421 said:

Playing around with the API and QlikView and it works pretty nice.

But I was wondering if a “User Based” API is possible or planned?
So you can request Statistics from a User:
- Get which maps have been played
- Current card collection
- Etc.

Of cures not for all users. Just for yourself with maybe an API Key form the Forum Page.

Would be nice to make a Completionist – Dashboard.
-> You are missing this card, this map and this Upgrades + this Charge upgrades.

Also would be fun to connect your current collection with the current (or historical) AH price to see how much it is worth.
 

This sounds like a good idea for an official Skylords Reborn Companion App for Android and iOS ?

 

If account-specific api's ever get released, it would be an honor to work on that! 

Link to comment
Share on other sites

On 12/15/2020 at 6:13 PM, fiki574 said:

For example, now you could create an application that tracks the average price of every card and makes a nice graph. 

I believe this wouldn't help as you'd want to know at which price they're sold instead of which price they are listed at as I believe often enough cards just never get sold at certain price ranges. This might already possible since I haven't read properly into it.

Link to comment
Share on other sites

53 minutes ago, dreaddy said:

Could it be the ID for Fire Sphere is wrong? It is 1664 but was 729 in the past. It also has a 22 ID gap at the end of the list.

Fire Sphere got a new ID to prevent interference in PvE maps (original devs put card IDs in there... Yeah I know, pretty stupid). 

I'm looking for the info the devs gave, it might have happend just on the discord, which wouldn't be nice. 

@dreaddy found it

 

And then on the wiki:

 

Screenshot_20210122-155425.jpg

Not sure about the ID gap thougt. That question can maybe be answeted by a dev

Link to comment
Share on other sites

45 minutes ago, T1421 said:

Another interesting AH fact:

Since the booster price has been changed the average price of an Ultra Rare card (including all, also cards like curse Orb or Volcano) raised from ~320 BFP to 400 BFP that’s around 25%

Unbenannt.thumb.png.7a9b00105e9aa22c2c2b443a173fefeb.png

which nicely fits the price raise of booster packs from 350 to 450, who would have thought :^)

Edited by Mynoduesp
Metagross31 likes this
Link to comment
Share on other sites

It's great that there is an API ?

I agree with ZeraZerg, that it's uncommon to have POST requests for this use-cases. 
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
 

Quote

POST

The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server.


Besides that, I like the amount of data which is available.

I created a small project to track long-term data of the stats (I started tracking Yesterday):
https://skylords.th.gl/
Code:
https://github.com/lmachens/skylords-reborn-tools

fiki574 likes this
Link to comment
Share on other sites

@Xeon,  That is awesome!

I just started at a similar statistic as you two days ago (in my case with a MYSQL DB) but had no time for some GUI stuff.
But you already have the result i was aiming for so, i will just look at your chats :-D
Unbenannt.jpg.bb9cb589d950323fdc5783ae6a1b3270.jpg

I’m very interested to see the one week of sessions graph.

Link to comment
Share on other sites

@T1421 Thx! 
I saw your card stats which are great ?

I updated the project and added long-term leaderboard stats.
https://skylords.th.gl/leaderboards
You can expand details for every ranked 1v1 (for now) player and see rating, wins/losses and activity over time.
There are not many data points for now because it is refreshed every 6 hours only.

@fiki574 Do you plan to add long-term data to the API too?

Link to comment
Share on other sites

Hmmm, i did my own leaderboard chart same days ago. (Just tracking Name + ELO + Time)

The plan was to make a statistic “The rising of Ultralord” :-D
But the problem is: I suck at PvP…

But still funny to see how Radical and Afro keeping the place and not moving at all

LEED.thumb.jpg.6f355c18683f5ccb59f3e72903758137.jpg

Link to comment
Share on other sites

9 hours ago, Xeon said:

Right now, it's possible to get current stats like "how many users are online right now".
Do you plan to add a history like "how many users were online yesterday"?

No, misses the point of our API and is too resource heavy to have it on our side. That's why you can query our API and create your own history :)

Link to comment
Share on other sites

4 hours ago, Xeon said:

Great, is your project public @T1421?

Sadly, not at the moment…

First have to transfer my MYSQL db from my network on a “real” server.
and the software I’m using is called QlikVIew. Free for personal use, but don’t think for public.

Link to comment
Share on other sites

Hi!
I looked into the API a bit over the last days, and some bits of the documentation confused me. Would be nice if someone ( @fiki574 :P ) could clarify this :)

For the Auctions API it states:
"Backend application caches new data every 10 minutes."

At the same time, the CSV export description notes
"Caches new entries every 2 minutes"

So, what exactly is happening every 10 minutes, and what every 2 minutes? It doesn't seem to make a lot of sense to me: Would the CSV be more up-to-date than the other requests? That'd be weird, right? But updating something every 2 minutes if the base data is only updated every 10 also doesn't seem to be useful. Help! :)

Edited by Larnak
Link to comment
Share on other sites

  • 3 weeks later...

Would it be possible to get an API for player profiles? I'm mostly interested in something like playerId, playerName, pvpRank, pvpElo and pveRank. Would be really cool to have this information for the replay sharing site. Also a lader with more than the top 200 players would be possible and nice.

Link to comment
Share on other sites

On 1/28/2021 at 11:22 PM, Larnak said:

Hi!
I looked into the API a bit over the last days, and some bits of the documentation confused me. Would be nice if someone ( @fiki574 :P ) could clarify this :)

For the Auctions API it states:
"Backend application caches new data every 10 minutes."

At the same time, the CSV export description notes
"Caches new entries every 2 minutes"

So, what exactly is happening every 10 minutes, and what every 2 minutes? It doesn't seem to make a lot of sense to me: Would the CSV be more up-to-date than the other requests? That'd be weird, right? But updating something every 2 minutes if the base data is only updated every 10 also doesn't seem to be useful. Help! :)

Damn, I totally missed your post. 3 weeks late, but I've corrected the times now: https://github.com/fiki574/Skylords-Reborn-API-UI/tree/master/Auctions#auctions-api

1 hour ago, Kaldra said:

Would it be possible to get an API for player profiles? I'm mostly interested in something like playerId, playerName, pvpRank, pvpElo and pveRank. Would be really cool to have this information for the replay sharing site. Also a lader with more than the top 200 players would be possible and nice.

No such player-specific API for now.

Ladders are with reason capped at 200 players: a) to match the ingame leaderboards and b) not to kill our database, because the current queries take almost 20 full minutes to execute and load data.

Larnak likes this
Link to comment
Share on other sites

55 minutes ago, fiki574 said:

No such player-specific API for now.

Ladders are with reason capped at 200 players: a) to match the ingame leaderboards and b) not to kill our database, because the current queries take almost 20 full minutes to execute and load data.

I understand. That's really interesting, I'm curious what database and structure it's running on?

For ladder/API purposes an elastic search cluster with already processed data might be a good solution. But I understand that ressources and time are limited - I wanted to work on the replay archive site for weeks, and didn't get to do it.

Link to comment
Share on other sites

  • 4 weeks later...
6 minutes ago, fiki574 said:

API breaking changes have been made to Leaderboards, check out the changes and update accordingly: https://github.com/fiki574/Skylords-Reborn-API-UI/blob/master/Leaderboards/README.md#leaderboards-api

This week I plan on updating Auctions, so next Wednesday expect an API breaking changes/updates to the Auctions as well.

Sometimes I want to look at the leaderboards in the web, and it tells me, that the backend is currently caching which can take up to 10min. Would it be possible, to keep the old index up while caching is done and only replace it with the new one?

Instead of deleting first and not having any data for 10min?

Edited by Kaldra
Link to comment
Share on other sites

15 hours ago, Kaldra said:

Sometimes I want to look at the leaderboards in the web, and it tells me, that the backend is currently caching which can take up to 10min. Would it be possible, to keep the old index up while caching is done and only replace it with the new one?

Instead of deleting first and not having any data for 10min?

Possibly, but requires additional mechanisms and logic. It will stay like this for now, however it might get improved at some point.

Leaderboards are getting refreshed once every 6 hours, meaning that there are 4 refreshes which take, on average, 10-15 minutes to complete, which then results in the leaderboards being "unavailable" for barely an hour in a day.

Link to comment
Share on other sites

  • fiki574 unpinned and locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use