I'm building an interactive graphic for a newspaper and there might be substantial traffic to your API. Is there a limit to how many calls you allow?
Also, is it possible to get a richer JSONP result, similar to XML where description and URL is included? I'm comparing this: http://en.wikipedia.org/w/api.php?action=opensearch&format=xml&limit... to this http://en.wikipedia.org/w/api.php?action=opensearch&format=json&limit=5&callback=myJsonpFunction&search=ltte http://en.wikipedia.org/w/api.php?action=opensearch&format=json&limi...
2011/2/8 Fossan, Eirik Wallem eirik.wallem.fossan@aftenposten.no:
I'm building an interactive graphic for a newspaper and there might be substantial traffic to your API. Is there a limit to how many calls you allow?
If you're just hitting the opensearch interface, as you suggest below, it ought to be fine. Our own search suggestions also use the API, and they're probably used more than a widget on Aftenposten's website :)
Also, is it possible to get a richer JSONP result, similar to XML where description and URL is included? I'm comparing this: http://en.wikipedia.org/w/api.php?action=opensearch&format=xml&limit... to this http://en.wikipedia.org/w/api.php?action=opensearch&format=json&limit=5&callback=myJsonpFunction&search=ltte http://en.wikipedia.org/w/api.php?action=opensearch&format=json&limi...
Unfortunately, no, not from action=opensearch. The fact that we don't offer this information in all formats kinda sucks; it's because the JSON format and XML format are different standards for returning search results. URLs are trivial to generate, though, with http://en.wikipedia.org/wiki/Pagename_with_underscores_instead_of_spaces
Roan Kattouw (Catrope)
Thanks for your quick reply. Appreciate it.
As JSON results are fairly limited, we consider setting up a proxy to fetch your XML-results - unless you want to set up a crossdomain file for us all :-)
Our sys admin is a bit worried about proxies and potential misuse. Are you ok with this?
Thanks, Eirik
-----Opprinnelig melding----- Fra: mediawiki-api-bounces@lists.wikimedia.org [mailto:mediawiki-api-bounces@lists.wikimedia.org] På vegne av Roan Kattouw Sendt: 8. februar 2011 23:58 Til: MediaWiki API announcements & discussion Emne: Re: [Mediawiki-api] Richer JSONP result & call limit?
2011/2/8 Fossan, Eirik Wallem eirik.wallem.fossan@aftenposten.no:
I'm building an interactive graphic for a newspaper and there might be substantial traffic to your API. Is there a limit to how many calls you allow?
If you're just hitting the opensearch interface, as you suggest below, it ought to be fine. Our own search suggestions also use the API, and they're probably used more than a widget on Aftenposten's website :)
Also, is it possible to get a richer JSONP result, similar to XML where description and URL is included? I'm comparing this: http://en.wikipedia.org/w/api.php?action=opensearch&format=xml&limit... to this http://en.wikipedia.org/w/api.php?action=opensearch&format=json&limit=5&callback=myJsonpFunction&search=ltte http://en.wikipedia.org/w/api.php?action=opensearch&format=json&limi...
Unfortunately, no, not from action=opensearch. The fact that we don't offer this information in all formats kinda sucks; it's because the JSON format and XML format are different standards for returning search results. URLs are trivial to generate, though, with http://en.wikipedia.org/wiki/Pagename_with_underscores_instead_of_spaces
Roan Kattouw (Catrope)
_______________________________________________ Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
2011/2/9 Fossan, Eirik Wallem eirik.wallem.fossan@aftenposten.no:
Thanks for your quick reply. Appreciate it.
As JSON results are fairly limited, we consider setting up a proxy to fetch your XML-results - unless you want to set up a crossdomain file for us all :-)
Our sys admin is a bit worried about proxies and potential misuse. Are you ok with this?
It should be fine; whether someone abuses our API directly or via your proxy doesn't really matter on our side.
If you set up a real proxy server, it should obey the Cache-Control header instructing it to cache responses for 24 hours. If you write your own makeshift proxy in PHP or something, please have it cache its fetches from api.php , and for your own good have it send Cache-Control: public, s-maxage=86400, max-age=86400 as well.
Roan Kattouw (Catrope)
Thanks for allowing us to open a proxy. We've cached searches etc. Click on the words to check it out: http://www.aftenposten.no/spesial/cablegate/?lang=en
-----Opprinnelig melding----- Fra: mediawiki-api-bounces@lists.wikimedia.org [mailto:mediawiki-api-bounces@lists.wikimedia.org] På vegne av Roan Kattouw Sendt: 9. februar 2011 20:28 Til: MediaWiki API announcements & discussion Emne: Re: [Mediawiki-api] Richer JSONP result & call limit?
2011/2/9 Fossan, Eirik Wallem eirik.wallem.fossan@aftenposten.no:
Thanks for your quick reply. Appreciate it.
As JSON results are fairly limited, we consider setting up a proxy to fetch your XML-results - unless you want to set up a crossdomain file for us all :-)
Our sys admin is a bit worried about proxies and potential misuse. Are you ok with this?
It should be fine; whether someone abuses our API directly or via your proxy doesn't really matter on our side.
If you set up a real proxy server, it should obey the Cache-Control header instructing it to cache responses for 24 hours. If you write your own makeshift proxy in PHP or something, please have it cache its fetches from api.php , and for your own good have it send Cache-Control: public, s-maxage=86400, max-age=86400 as well.
Roan Kattouw (Catrope)
_______________________________________________ Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
mediawiki-api@lists.wikimedia.org