I would love to add some deeper semantic statistics to WikiApiary beyond what is reported in the smwinfo API method. This enhancement request could be seen as a request to add more to smwinfo, but I think it would be better (and more generic) as an enhancement to the Ask API.
I would specifically like to execute this query via the API:
{{#ask:[[Query size::+]]|format=count}}
by doing:
Right now this will result in a PHP exception:
PHP message: PHP Catchable fatal error: Argument 1 passed to ApiSMWQuery::addQueryResult() must be an instance of SMWQueryResult, string given, called in /SemanticMediaWiki/includes/api/ApiAsk.php on line 48 and defined in /SemanticMediaWiki/includes/api/ApiSMWQuery.php on line 82
The Ask API does allow parameters like sort and order to be passed, but it doesn't seem to handle format at all. For most cases format doesn't make sense (table, ul, array). However, aggregation formats methods like count, max, min, earliest, latest do make a lot of sense.
It would be really great to be able to do these queries via the API. I would then add this as extended semantic information to retrieve and graph in WikiAiary. :-)
Version: master
Severity: enhancement