Thank you for visiting SotAwiki, a Shroud of the Avatar Wiki Encyclopedia. If you see any information that is outdated, please take the time to update it, or if you prefer, leave a message for other editors. This community wiki is for the benefit of all Avatars!
SotAWiki:API
Mediawiki has a public API. "But Fenyx4" you say "the MW API doesn't curate the data in a useful way for me!" No it doesn't. That is where SMW comes in. This is a benefit of Semantic mediawiki. SMW has a public api for getting data. You can query it here (for example recipe data) in a broad range of formats. As I am familiar with the data structure I will gladly help write queries. All I would ask in return for using our data is that they have somewhere on their site "data provided by SotAwiki.net" or somethin' like that.
Here is an example query that pulls the recipes into a csv file.
This is using Semantic MediaWiki to pull the info from the pages themselves. This page helps you craft the queries.
Here's some links for further reading;
http://semantic-mediawiki.org/wiki/Help:Special:Ask
http://semantic-mediawiki.org/wiki/Help:Result_formats
P.S. There is a limit to how many records can be retrieved from the API in any one call. We aren't near that limit yet but if you want to develop for the future the stuff below should help...
That ups the limit to 500 (which gets all 158 that we currently have). We may eventually hit a max the server will serve up due for performance reasons and at that point we'll have to break it up into multiple queries with an offset (example below).
The Special:Browse page lets you see what properties an article has, so, for example Iron Halberd has these properties. That will let you look at the properties that are directly used by the kind of items you want to search for. But take special note of the "Has subobject" section. It may simply say "Iron Halberd" there a couple time but if you click on the plus it will pull up the recipe.
(Technical aside: Recipes had to be subobjects because otherwise the ingredients for two recipes for the same item would have bled together. This is why when you query for a recipe you don't get the final stats. But the recipe does have the actual item as its Has parent property. Which you can then query by to get the other attributes.)
You can also look at all the properties to look for ones you may not be aware of. But that can be a bit of informational overload.