https://bugzilla.wikimedia.org/show_bug.cgi?id=46458
Web browser: ---
Bug ID: 46458
Summary: Ability to use count via the SMW Ask API
Product: MediaWiki extensions
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: Semantic MediaWiki
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
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:
http://wikiapiary.com/w/api.php?action=ask&query=%5B%5BQuery%20size%3A%3A%2B%5D%5D%7Cformat%3Dcount&format=json
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. :-)
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l