aym / google-ajax-apis

Automatically exported from code.google.com/p/google-ajax-apis
0 stars 0 forks source link

get the top stories by the News Search API #585

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Now, I want to get the top stories by the news search API. As I tested, I can 
search something by the api, and restrict the search content (e.g. from top 
stories topic or Bussiness topic). 
But what I want to get are all top stories or Business stories, not focus on 
the search keyword. 

Thanks, 
Gavin

Original issue reported on code.google.com by Gavin....@gmail.com on 25 May 2011 at 7:21

GoogleCodeExporter commented 8 years ago
Look in the documentation at the topic argument for the RESTful side and the 
.setRestriction() method on the Javascript side. You can use that to get the 
top stories in various sections.

Original comment by jrgeer...@gmail.com on 26 May 2011 at 4:45

GoogleCodeExporter commented 8 years ago
Thanks for your response. I am using Javascript now. 
I find there is the .setRestriction() method to restrict the search result. But 
my question is, for the search API, I have to point out something to search in 
method: execute()(e.g. execute("sports")), and then restrict the result 
according to the .setRestriction() method, whether I can get the top stories 
directly? and needn't point out something to search?

Thanks, 
Gavin  

Original comment by Gavin....@gmail.com on 3 Jun 2011 at 5:38