fiki574 Posted December 15, 2020 Share Posted December 15, 2020 Hello everyone. I'll keep it short. Past few months, I've been working on our web API that is completely public and available for everyone to use. I've also created simple, functional (but stylistically not very pretty) user interfaces that visualize and consume the said API. User interface applications are open-sourced on my GitHub. The repository also contains complete instructions on how to consume the API yourselves, if you were to decide to create your own frontend applications. But, you have to be somewhat profficient in web development to understand and begin doing stuff on your own. Issues tab is to be used freely for any and all suggestions and bug reports. Pull Requests that improve and extend the existing UIs are more than welcome. After manual review, they might get merged into the master branch and appear as a part of the next website update. Links: GitHub repository: https://github.com/fiki574/Skylords-Reborn-API-UI Statistics: https://stats.skylords.eu/ Auctions: https://auctions.skylords.eu/ Leaderboards: https://leaderboards.skylords.eu/ All applications are caching data periodically, so you're actually "querying" the in-memory data, and not the database directly, which does not have any kind of impact on the game servers and database itself. Have in mind these applications are also the first version, they will definetly get improved and extended, as well as the API. For some of you, these applications and the API open up whole lot of possibilities. For example, now you could create an application that tracks the average price of every card and makes a nice graph. You could even extend the search options with card orbs, expansion, rarity, etc. Or you could create an application that tracks all auctions for a specific card and sends you a mail or push notification when a card appears on the auction house, but is equal or below the specified price. Average concurrent players/matches graph could be visualized by querying the Statistics API every 2/5/X minutes. Those of you who understood everything said and know what you're doing, will use this to its maximum potential. Have fun! Mynoduesp, Ultralord, Hirooo and 13 others like this Link to comment Share on other sites More sharing options...
fiki574 Posted December 18, 2020 Author Share Posted December 18, 2020 (have in mind since we just released, data will be missing as we've reset everything) Mynoduesp and Maze like this Link to comment Share on other sites More sharing options...
Mahmod Hasan Posted December 18, 2020 Share Posted December 18, 2020 (edited) does this contain profile data? i will create a mobile/web client for the game using this API with iconic react. Edited December 18, 2020 by Mahmod Link to comment Share on other sites More sharing options...
Maze Posted December 18, 2020 Share Posted December 18, 2020 This is so amazing. Thank you all so much for allowing the community to be even more involved in the amazing work you all have done. With this I can finally expand my project and create the site that I envisioned. Again, thanks so much! fiki574, Volin, RuneSeeker and 1 other like this Link to comment Share on other sites More sharing options...
fiki574 Posted December 18, 2020 Author Share Posted December 18, 2020 2 minutes ago, Maze said: Thank you all so much for allowing the community to be even more involved in the amazing work you all have done. That's the point of this Maze likes this Link to comment Share on other sites More sharing options...
Mynoduesp Posted December 18, 2020 Share Posted December 18, 2020 Thanks! I'll play around with it when I've got some time again. ? Link to comment Share on other sites More sharing options...
Maze Posted December 19, 2020 Share Posted December 19, 2020 (edited) In my log I noticed, that the total number of auctions in the API hasn't changed since 6 pm CET when the number first reached 5000 auctions, even though there are clear price fluctuations visible for most cards since then. So I wanted to ask if the number of auctions that the api responds with is capped at 5000, or if this is just some extreme coincidence? Thanks. Edited December 19, 2020 by Maze Link to comment Share on other sites More sharing options...
fiki574 Posted December 20, 2020 Author Share Posted December 20, 2020 18 hours ago, Maze said: In my log I noticed, that the total number of auctions in the API hasn't changed since 6 pm CET when the number first reached 5000 auctions, even though there are clear price fluctuations visible for most cards since then. So I wanted to ask if the number of auctions that the api responds with is capped at 5000, or if this is just some extreme coincidence? Thanks. Unintentional cap, removed it. Maze and Mynoduesp like this Link to comment Share on other sites More sharing options...
fxfighter Posted December 21, 2020 Share Posted December 21, 2020 Excellent job on this! Would it be feasible to have an endpoint that outputs a csv or something similar of the current auctions? Purpose being that I would like to be able to import data into a spreadsheet for my own searching/filtering but need the auction information in a digestable format. Link to comment Share on other sites More sharing options...
ikke2902 Posted December 21, 2020 Share Posted December 21, 2020 Is there a way to tell what the affinity of a card is? There are for axample two card ID for gladiatrix, but there is no stats mentioning the affinity. Link to comment Share on other sites More sharing options...
fiki574 Posted December 21, 2020 Author Share Posted December 21, 2020 17 minutes ago, ikke2902 said: Is there a way to tell what the affinity of a card is? There are for axample two card ID for gladiatrix, but there is no stats mentioning the affinity. There isn't a way to get it directly, but you can query the card details endpoint to see what can be used. Steps: 1. Fetch the auctions: https://github.com/fiki574/Skylords-Reborn-API-UI/tree/master/Auctions#post-apiauctionspagenumber 2. Use the cardId fields from the response array 3. Fetch card details: https://github.com/fiki574/Skylords-Reborn-API-UI/tree/master/Auctions#get-apicardscardid 3 hours ago, fxfighter said: Excellent job on this! Would it be feasible to have an endpoint that outputs a csv or something similar of the current auctions? Purpose being that I would like to be able to import data into a spreadsheet for my own searching/filtering but need the auction information in a digestable format. All suggestions are welcome here: https://github.com/fiki574/Skylords-Reborn-API-UI/issues The backend returns JSON as a response, which is definetly a digestable and convertable format. Not sure about the default spreadsheet support for it, but you could always temporarily use some kind of an online converter, like so: https://www.convertcsv.com/json-to-csv.htm Link to comment Share on other sites More sharing options...
ikke2902 Posted December 21, 2020 Share Posted December 21, 2020 11 minutes ago, fiki574 said: There isn't a way to get it directly, but you can query the card details endpoint to see what can be used. Steps: 1. Fetch the auctions: https://github.com/fiki574/Skylords-Reborn-API-UI/tree/master/Auctions#post-apiauctionspagenumber 2. Use the cardId fields from the response array 3. Fetch card details: https://github.com/fiki574/Skylords-Reborn-API-UI/tree/master/Auctions#get-apicardscardid I don't see the affinity following the third step or am I skipping something? I went with this link https://auctions.backend.skylords.eu/api/cards/all Link to comment Share on other sites More sharing options...
Ladadoos Posted December 21, 2020 Share Posted December 21, 2020 1 hour ago, ikke2902 said: I don't see the affinity following the third step or am I skipping something? I went with this link https://auctions.backend.skylords.eu/api/cards/all You're not skipping something: there is no affinity as of now. But we are keen to improve this so please do create suggestions in the link fiki sent: https://github.com/fiki574/Skylords-Reborn-API-UI/issues Link to comment Share on other sites More sharing options...
Ultralord Posted December 21, 2020 Share Posted December 21, 2020 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. Link to comment Share on other sites More sharing options...
Angel Posted December 22, 2020 Share Posted December 22, 2020 Is there anyway to get data when an item is actually bought/sold on the AH? Or are we limited to just the listings (the information we would normally be able to obtain via the game client)? Link to comment Share on other sites More sharing options...
fiki574 Posted December 22, 2020 Author Share Posted December 22, 2020 17 hours ago, 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. Glad you like it. All suggestions are welcome here: https://github.com/fiki574/Skylords-Reborn-API-UI/issues 7 hours ago, Angel said: Is there anyway to get data when an item is actually bought/sold on the AH? Or are we limited to just the listings (the information we would normally be able to obtain via the game client)? Just the live listings. Link to comment Share on other sites More sharing options...
xs0ulLess Posted December 22, 2020 Share Posted December 22, 2020 Glad to see there are other fellow IT fags playing with this. I'd love to dev some scripts myself but I'm very busy with work atm. However, know that i'm lurking about to make some contributions - won't quit the game for some time. Thanks for posting this Link to comment Share on other sites More sharing options...
anonyme0273 Posted December 22, 2020 Share Posted December 22, 2020 Will you be implementing a token authentication for auctions, perhaps for a future mobile app on which to follow and do trades efficiently an on the go? Link to comment Share on other sites More sharing options...
Maxxxel Posted December 22, 2020 Share Posted December 22, 2020 On 12/18/2020 at 12:11 PM, Maze said: This is so amazing. Thank you all so much for allowing the community to be even more involved in the amazing work you all have done. With this I can finally expand my project and create the site that I envisioned. Again, thanks so much! Wow nice jo On 12/15/2020 at 6:13 PM, fiki574 said: Hello everyone. I'll keep it short. Past few months, I've been working on our web API that is completely public and available for everyone to use. I've also created simple, functional (but stylistically not very pretty) user interfaces that visualize and consume the said API. User interface applications are open-sourced on my GitHub. The repository also contains complete instructions on how to consume the API yourselves, if you were to decide to create your own frontend applications. But, you have to be somewhat profficient in web development to understand and begin doing stuff on your own. Issues tab is to be used freely for any and all suggestions and bug reports. Pull Requests that improve and extend the existing UIs are more than welcome. After manual review, they might get merged into the master branch and appear as a part of the next website update. Links: GitHub repository: https://github.com/fiki574/Skylords-Reborn-API-UI Statistics: https://stats.skylords.eu/ Auctions: https://auctions.skylords.eu/ Leaderboards: https://leaderboards.skylords.eu/ All applications are caching data periodically, so you're actually "querying" the in-memory data, and not the database directly, which does not have any kind of impact on the game servers and database itself. Have in mind these applications are also the first version, they will definetly get improved and extended, as well as the API. For some of you, these applications and the API open up whole lot of possibilities. For example, now you could create an application that tracks the average price of every card and makes a nice graph. You could even extend the search options with card orbs, expansion, rarity, etc. Or you could create an application that tracks all auctions for a specific card and sends you a mail or push notification when a card appears on the auction house, but is equal or below the specified price. Average concurrent players/matches graph could be visualized by querying the Statistics API every 2/5/X minutes. Those of you who understood everything said and know what you're doing, will use this to its maximum potential. Have fun! Awesome! Link to comment Share on other sites More sharing options...
dreaddy Posted December 22, 2020 Share Posted December 22, 2020 (edited) hmm... so many possibilities ;). I think i'll play around a bit with it. Do you have a list of all current cardids/names and maybe images of all cards? My backup of bf programming stuff from 10 years ago is not as good as I hoped ;). Edited December 22, 2020 by dreaddy Link to comment Share on other sites More sharing options...
fiki574 Posted December 22, 2020 Author Share Posted December 22, 2020 1 hour ago, anonyme0273 said: Will you be implementing a token authentication for auctions, perhaps for a future mobile app on which to follow and do trades efficiently an on the go? Never, unfortunately. Explained somewhere that it opens up too much boting possibilities. 1 hour ago, dreaddy said: hmm... so many possibilities ;). I think i'll play around a bit with it. Do you have a list of all current cardids/names and maybe images of all cards? My backup of bf programming stuff from 10 years ago is not as good as I hoped ;). Yea, have a list but without images. https://auctions.backend.skylords.eu/api/cards/all Link to comment Share on other sites More sharing options...
Maze Posted December 23, 2020 Share Posted December 23, 2020 I put together a temporary API of my own, with parts of the data that I use on my site. Note that the structure and the contents are only temporary and subject to change! If you are interested, you can find the API here: https://smj.herokuapp.com/api/temporary Link to comment Share on other sites More sharing options...
ZeraZerg Posted December 23, 2020 Share Posted December 23, 2020 I've found some inconsistencies in the API signature... This endpoint https://github.com/fiki574/Skylords-Reborn-API-UI/tree/master/Auctions#post-apiauctionspagenumber is a POST and it should be a GET because you are retrieveing information and is the auction state do not change it should be idemponent. Why is a POST? Also... This API is opensource or restitrcted to verfied developers? Also I've found many other errors that would like to discuss or at least notify, but this post wolud be too long and boring ^.^' Link to comment Share on other sites More sharing options...
fiki574 Posted December 25, 2020 Author Share Posted December 25, 2020 On 12/24/2020 at 12:49 AM, ZeraZerg said: I've found some inconsistencies in the API signature... This endpoint https://github.com/fiki574/Skylords-Reborn-API-UI/tree/master/Auctions#post-apiauctionspagenumber is a POST and it should be a GET because you are retrieveing information and is the auction state do not change it should be idemponent. Why is a POST? Also... This API is opensource or restitrcted to verfied developers? Also I've found many other errors that would like to discuss or at least notify, but this post wolud be too long and boring ^.^' It is not recommended and in most cases not supported to have a request body in a GET request. Since you are sending a JSON to that endpoint, it should use POST. This is basics of web development and semantics. Frontend applications and API specifications are open-sourced, backend is not. I highly doubt you found many other errors cause I have no problems running any of the applications, be it frontend or backend, locally or on a VPS. You might have found some misstypes or inconsistencies, but I hardly doubt you found errors per se. All reports and suggestions are welcome here: https://github.com/fiki574/Skylords-Reborn-API-UI/issues Link to comment Share on other sites More sharing options...
ZeraZerg Posted December 26, 2020 Share Posted December 26, 2020 (edited) Quote Frontend applications and API specifications are open-sourced, backend is not. What do you mean? Quote It is not recommended and in most cases not supported to have a request body in a GET request. Since you are sending a JSON to that endpoint, it should use POST. This is basics of web development and semantics. Yes I know, that but the point is that the resource POST /api/auctions/:page/:number with the body could be simply converted as query parameters this way: /api/auctions/:page/:number ==> /api/auctions?page=1&resultsPerPage=1 Reason: the resource you are waintg to retrieve is "auctions", not the "number" Also change "number" to "resultsPerPage", which is more clear as user. Can set a defalut number of "30" or just make it mandatory. You can make "page" it mandatory giving a 4XX error and feedback. input ==> cardName. Query param also Reason: More semantical name, excep for technical limitations no extra info is required, the names gives all the meta info needed Optional min ==> minBfpPrice. Query param also Reason: More semantical name, excep for technical limitations no extra info is required, the names gives all the meta info needed Optional max ==> maxBfpPrice. Query param also Reason: More semantical name, excep for technical limitations no extra info is required, the names gives all the meta info needed Optional Having this all together the "POST /api/auctions/:page/:number" + "Body" can be a simple "GET /api/auctions?page=1&resultsPerPage=1&cardName=Master Archers&minBfpPrice=12&maxBfpPrice=30000" and no Body is required 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) Quote I highly doubt you found many other errors cause I have no problems running any of the applications, be it frontend or backend, locally or on a VPS. You might have found some misstypes or inconsistencies, but I hardly doubt you found errors per se. All reports and suggestions are welcome here: https://github.com/fiki574/Skylords-Reborn-API-UI/issues I'll post the same on the issues page from github, I just wanted to give a more direct developer-friendly response. Thank you for your hard work, fellow Skylord. Edited December 26, 2020 by ZeraZerg fiki574 likes this Link to comment Share on other sites More sharing options...
Recommended Posts