Hi can someone tell me how to use the gdata Codesearch API and augment the number of results from the Query higher than 10 ?
I allr开发者_如何学编程eady check the CodesearchExample.py from Code Google Gdata - CodesearchExample , but couldn't find a way to do it.
Anyone got an idea ?
You can't directly use GetSnippetsFeed like the example does. GetSnippetsFeed is actually a wrapper that creates a CodesearchQuery object without any parameters. If you create that object yourself you can set the max_results property.
service = gdata.codesearch.service.CodesearchService(source='my_test_app-1.0')
query = gdata.codesearch.service.CodesearchQuery(text_query="search text")
query.max_results=15
feed = service.Query(query.ToUri())
精彩评论