-
Notifications
You must be signed in to change notification settings - Fork 11
Python opensearch
toshikurauchi edited this page Feb 17, 2011
·
1 revision
Restfulie client supports opensearch with both xml and json out of the box. Atom support can be included by adding a media type handler for atom.
The opensearch media type handler allows unmarshalling an open search descriptor file, such as:
description = Restfulie.at('http://localhost:3000/products/opensearch.xml')
.accepts('application/opensearchdescription+xml').get().resource()
And now, a description object can be searched by invoking the use method:
items = description.use('application/xml').search(searchTerms = what, startPage = 1)
There is a sample application showcasing open search usage on the client side at restfulie-restbuy.