Page MenuHomePhabricator

Some api responses do not contain coordinates even when you provide a colimit parameter
Closed, DeclinedPublic

Description

Some api responses e.g. http://en.m.wikipedia.org/w/api.php?format=json&action=query&prop=pageimages%7Ccoordinates&pithumbsize=180&pilimit=50&generator=geosearch&ggscoord=37.78670760000001%7C-122.39959539999998&ggsradius=10000&ggsnamespace=0&ggslimit=50&_=1365705318404

do not return coordinates in the results
In this specific example the following is returned:
"4574532":{"pageid":4574532,"ns":0,"title":"Palace Hotel, San Francisco","thumbnail":{"source":"http://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Palace_Hotel_and_Lotta%27s_Fountain.jpg/180px-Palace_Hotel_and_Lotta%27s_Fountain.jpg","width":180,"height":135},"pageimage":"Palace_Hotel_and_Lotta's_Fountain.jpg"}

Expected: if there are no coordinates it shouldn't appear in the response


Version: unspecified
Severity: normal

Details

Reference
bz47133

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:30 AM
bzimport added a project: GeoData.
bzimport set Reference to bz47133.
bzimport added a subscriber: Unknown Object (MLST).

What does colimit=max do?!

Although this solves my problem these oddities make our API harder to consume/understand so I still think there is a bug here in that we should probably provide a default value for 'colimit' thus reopening.

That's how our API works, all query modules have their own limits independent of other modules used in the same query.

Well that's dumb (especially in this place... really 3 limits in a query...?!?) and every time we resolve such a ticket as invalid we are missing an opportunity to make the API more developer friendly to the people who have the desire to use it.

I agree this is a problem, however without changes to MW API it's not very feasible to fix just in one module.