Using Hunch on Google App engine
I want to use Hunch on Google App Engine in Python. What libraries do I need to use to do this or are there any good online tutorials that could help me with t开发者_如何学Pythonhis?
I would start from the API Overview documentation of the official site.
Basically Hunch API calls are authenticated GET or POST HTTP requests where the returned values are JSON encoded.
Example:
get the list of the top recommended movies:
http://api.hunch.com/api/v1/get-recommendations/?topic_ids=all_544&limit=10
get-recommendation is just one of the many available routes that Hunch API offers; to get an overview of all the available methods, have fun playing with the API console.
On google App Engine you would need:
- UrlFetch API to make the HTTP Api calls
- simplejson to decode the results
Here are a couple of Hunch GAE projects that should help you to get started:
- hunch-gift-app
- hunch-sample-app
As referenced by gleitz, you can find a Python wrapper here.
Recently, mnn2104 wrote a Python wrapper for the Hunch API called HunchPY.
As for tutorials, a good place to start is the the Hunch Developer homepage and Hunch's Github profile.
精彩评论