Commons:Wiki Loves Monuments 2011/May Meeting/Notes/Tech
Jump to navigation
Jump to search
- Wiki Loves Monuments meetup
- Friday 13th, 14th and 15th May 2011, Betahaus, Berlin
Notes from Tech-discussion[edit]
(steal form http://commons.wikimedia.org/w/api.php )
- https://secure.wikimedia.org/wikipedia/commons/wiki/Commons:Wiki_Loves_Monuments_2011/Monuments_database
- http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/
- https://svn.toolserver.org/svnroot/p_erfgoed/api
All calls are normal GET requests, e.g <http://api.wikilovesmonuments.eu/?format=json&action=search&>.
Properties must be URL encoded using UTF-8.
- Ideas on parameters
- Common parameters (applicable to all orders)
- props = [country|lang|id|name|address|municipality|lat|lon|image|source|changed]: the properties which should be returned. (By default all of them.
- format= [kml|gpx|poi|html|layar|json|xml]
- action=[search|statistics|help] (default=help)
- callback = [callbackname] (used for JSONP for Javascript mashups). Implies format=JSON.
- limit = [integer] (the maximum number of results you will get back, 100 by default. Max 500.
- bbox = left,bottom,right,top. Bounding box with topleft and bottomright latlong coordinates. E.g. bbox=11.54,48.14,11.543,48.145. This is the same way OSM works (see http://wiki.openstreetmap.org/wiki/API_v0.5#Retrieving_nodes.2C_ways.2C_and_relations)
- Specific orders action =
- search: searches monuments containing the specified text OR "*" to show all monuments within the following parameters:
- srcountry = countrycode (by default all is returned, this should be a valid two-character ISO 639-1 code)
- srquery = Freeform search on all fields. (e.g. 'srquery=Brandenburger%20Tor')
- sr<prop> = Freeform search on a property
- srmunicipality = municipality (freeform search)
- sraddress = address (freeform search)
- srwith<prop>=
- srwithout<prop>=
- srwithimage=[true|false]
- srcoordinates = [true|false] (no parameter = any) ?? <-- What does this mean?
- srimage = [true|false] (no parameter = any) ??
- srcontinue = (whatever the previous call gave you)
- statistics: gives statistical data, of a given country
- stcountry = countrycode (by default all is returned, this should be a valid twocharacter ISO 639-1 code)
- stvar = [withimage|withcoordinates|noimage|nocoordinates|total|add more]
- stformat = [percent|number|both]
Please note: Just ideas. Feel free to improve, delete or whatever you want.
Search operators:
foo Exactly 'foo'
foo%Begins with foo
%fooEnds with foo
%foo% Contains foo anywhere
https://jira.toolserver.org/browse/TS-1033
- Do some sort of query
- For each row create an object
- Render the object in the output format