API Questions

5 views
Skip to first unread message

Steven

unread,
Nov 2, 2009, 12:19:55 PM11/2/09
to Geograph-API-Users
Hello,

I noticed in the API documentation that the default RSS search should
return 20 results, however in practice it seems to give 15. For
example:

http://www.geograph.org.uk/syndicator.php?key=[apikey]

Is it possible to change the number to say 50 for a given api key, or
do I need to generate a search id each time and run multiple get
requests to pull down pages 1-5? The latter is easily done, but will
use more bandwidth and cpu time.

Something I've noticed whilst testing is that some searches seem to
not mind if either no or an invalid apikey is used, others do or
generate PHP errors. For example:

http://www.geograph.org.uk/export.csv.php?key=[apikey]

doesn't work (and gracefully gives an error), but:

http://www.geograph.org.uk/api/photo/1234/%5Bapikey%5D

does. However:

http://www.geograph.org.uk/syndicator.php?key=[apikey]&i=12345&page=2

gives:

Warning: implode() [function.implode]: Bad arguments. in /var/www/
geograph_live/libs/geograph/searchengine.class.php on line 448

Warning: Cannot modify header information - headers already sent by
(output started at /var/www/geograph_live/libs/geograph/
searchengine.class.php:448) in /var/www/geograph_live/libs/geograph/
functions.inc.php on line 642

Warning: Cannot modify header information - headers already sent by
(output started at /var/www/geograph_live/libs/geograph/
searchengine.class.php:448) in /var/www/geograph_live/libs/geograph/
functions.inc.php on line 643

Warning: Cannot modify header information - headers already sent by
(output started at /var/www/geograph_live/libs/geograph/
searchengine.class.php:448) in /var/www/geograph_live/libs/geograph/
functions.inc.php on line 644

It doesn't affect me either way, but thought you might like to know :)

Many thanks

Steven

barryhunter

unread,
Nov 2, 2009, 5:36:24 PM11/2/09
to Geograph-API-Users
There are a few ways of getting more results in one query - but it
depends on the type of query.
- I'll actully follow up on this off-list, on how to proceed.

But will certainly update the documentation. At some point we changed
the default page size.

As for keys - don't tell anyone, but sometimes they are validated,
sometimes they just used for tracking and/or a means to block.
- but certainly shouldnt give php errors. (but that might just be the
example i number you happened to pick)

Barry
Reply all
Reply to author
Forward
0 new messages