How to invoke a search api from drupal site for Ubuntu Unity lense? I'm creating a simple Unity lense for my college site which is based on Drupal, but I don't know how to adapt this command for Drupal API. Please help, it's python.


  We now create our query url, using the Wikipedia opensearch API url = ("%s/w/api.php?action=opensearch&amp;limit=25&amp;format=json&amp;search=%s" % (self.wiki, search))


I'm using template to write lense following Wikipedia example http://developer.ubuntu.com/2012/04/how-to-create-a-wikipedia-unity-lens-for-ubuntu/. I don't know python but Im familiar with C. This Drupal API calling is the only problem I have to successfully develop a lense. Please help!
Your site is running Drupal 6.26
http://en.ict.edu.rs/CHANGELOG.txt

The Unity Lense does not require OpenSearch. You essentially just need to Curl your search results page with a querystring and parse out the search result links.

Eg, send a Curl request with:
http://en.ict.edu.rs/search/node/example

You could show some answers easily that way for any drupal site. You could setup a custom View for searching your content as well if you wanted, or even install the Services module and make a small dedicated search api.

I'm actually running Ubuntu 12.04 here and installed the Lense stuff which looks neat -- but I'm too busy to code up a small example, sorry. Hopefully these thoughts will point you in the right direction.

EDIT: alot of the code is really there already when you start your Lense project. You just need to tear through the results from /search/node/KEYWORDS_HERE you get from the request in Python ...