help with writing a python client



Hi,

I am trying to write a python client by examining the libbeagle api
(since it looks like python module is just a wrapper).  So far I have
this python test

>>> import beagle
>>> client = beagle.Client()
>>> query = beagle.Query()
>>> query.add_text('images')
>>> resp = client.send_request(query)
>>> resp
<beagle.SearchTermResponse object at 0xb7da411c
(BeagleSearchTermResponse at 0x81ee600)>
>>>

Problem is I can't figure out what to do with SearchTermResponse

I have seen in the examples a method get_hits() but it seems that is
on BeagleHitsAddedResponse.

What am I doing wrong to produce a SearchTermResponse instead of a
BeagleHitsAddedResponse?

BTW, I need synchronous requests because this is going in a web app.

Thanks,
ryan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]