junotown 0 Share Posted March 5, 2022 I have been trying to work the PC Gaming Wiki API as I have used it before but has something changed with the way the API works as I can't seem to get the information I previously was able to. Unsure whether the documentation is not updated but when I use this call (which is an example on the documentation): https://www.pcgamingwiki.com/w/api.php?action=askargs&conditions=Steam+AppID::863550&printouts=4K_Ultra_HD|Ultra-widescreen|Published_by&format=jsonfm it brings back empty lists but on the Hitman 2 page there is listings for Publishers so it shouldn't be empty? Any help would be greatly appreciated, thanks! Reply (Quote) Link to comment Share on other sites More sharing options...
Aemony 142 Share Posted March 5, 2022 The site has migrated from using Semantic MediaWiki for backend data stuff to using Cargo instead, which is why your query does not return anything. Cargo is basically a wrapper around the underlying SQL database, so queries are more SQL-based than before. Example: https://www.pcgamingwiki.com/w/api.php?action=cargoquery&format=json&tables=Infobox_game,Video&fields=Infobox_game._pageID%3DPageID%2CInfobox_game.Steam_AppID,Video.4K_Ultra_HD,Video.Ultrawidescreen&join_on=Infobox_game._pageID%3DVideo._pageID&where=Infobox_game.Steam_AppID%20HOLDS%20%221245620%22 You can see all tables and what columns they include here: https://www.pcgamingwiki.com/wiki/Special:CargoTables Reply (Quote) Link to comment Share on other sites More sharing options...
junotown 0 Author Share Posted March 5, 2022 12 hours ago, Aemony said: The site has migrated from using Semantic MediaWiki for backend data stuff to using Cargo instead, which is why your query does not return anything. Cargo is basically a wrapper around the underlying SQL database, so queries are more SQL-based than before. Example: https://www.pcgamingwiki.com/w/api.php?action=cargoquery&format=json&tables=Infobox_game,Video&fields=Infobox_game._pageID%3DPageID%2CInfobox_game.Steam_AppID,Video.4K_Ultra_HD,Video.Ultrawidescreen&join_on=Infobox_game._pageID%3DVideo._pageID&where=Infobox_game.Steam_AppID%20HOLDS%20%221245620%22 You can see all tables and what columns they include here: https://www.pcgamingwiki.com/wiki/Special:CargoTables Thank you for the help! Really appreciate it! Is there anywhere that I can keep track of any changes to the API if anymore were to occur? Reply (Quote) Link to comment Share on other sites More sharing options...
Aemony 142 Share Posted March 14, 2022 We don't really have a mailing list or anything like that for the API or even changes in general, sadly. But it's not bound to change much at this point so should be fine to reconfigure everything based around Cargo API queries instead and then just let that be it. Reply (Quote) Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.