Example #1
0
 /// <summary>
 /// Search news.
 /// </summary>
 /// <param name="keyword">The keyword.</param>
 /// <param name="resultCount">The count of result itmes.</param>
 /// <param name="geo">A particular location of the news. You must supply either a city, state, country, or zip code as in "Santa Barbara" or "British Columbia" or "Peru" or "93108".</param>
 /// <param name="sortBy">The way to order results.</param>
 /// <returns>The result items.</returns>
 /// <remarks>Now, the max count of items Google given is <b>64</b>.</remarks>
 public IList <INewsResult> Search(string keyword, int resultCount, string geo, string sortBy)
 {
     return(this.Search(keyword, resultCount, geo, sortBy, null, NewsTopic.GetDefault(), NewsEdition.GetDefault()));
 }
Example #2
0
 /// <summary>
 /// Begins an asynchronous request for searching the latest local news.
 /// </summary>
 /// <param name="geo">A particular location of the news. You must supply either a city, state, country, or zip code as in "Santa Barbara" or "British Columbia" or "Peru" or "93108".</param>
 /// <param name="resultCount">The count of result itmes.</param>
 /// <param name="sortBy">The way to order results.</param>
 /// <param name="callback">The <see cref="AsyncCallback"/> delegate.</param>
 /// <param name="state">An object containing state information for this asynchronous request.</param>
 /// <returns>An <see cref="IAsyncResult"/> that references the asynchronous request.</returns>
 public IAsyncResult BeginSearchLocal(
     string geo, int resultCount, string sortBy, AsyncCallback callback, object state)
 {
     return(this.BeginSearchLocal(geo, resultCount, sortBy, null, NewsTopic.GetDefault(), NewsEdition.GetDefault(), callback, state));
 }
Example #3
0
 /// <summary>
 /// Begins an asynchronous request for searching the latest news of specified topic.
 /// </summary>
 /// <param name="topic">This optional argument tells the news search system to scope search results to a particular topic.</param>
 /// <param name="resultCount">The count of result itmes.</param>
 /// <param name="callback">The <see cref="AsyncCallback"/> delegate.</param>
 /// <param name="state">An object containing state information for this asynchronous request.</param>
 /// <returns>An <see cref="IAsyncResult"/> that references the asynchronous request.</returns>
 public IAsyncResult BeginSearchTopic(string topic, int resultCount, AsyncCallback callback, object state)
 {
     return(this.BeginSearchTopic(topic, resultCount, SortType.GetDefault(), null, NewsEdition.GetDefault(), callback, state));
 }
Example #4
0
 /// <summary>
 /// Search the latest news of specified topic.
 /// </summary>
 /// <param name="topic">This optional argument tells the news search system to scope search results to a particular topic.</param>
 /// <param name="resultCount">The count of result itmes.</param>
 /// <returns>The result items.</returns>
 /// <remarks>Now, the max count of items Google given is <b>64</b>.</remarks>
 public IList <INewsResult> SearchTopic(string topic, int resultCount)
 {
     return(this.SearchTopic(topic, resultCount, SortType.GetDefault(), null, NewsEdition.GetDefault()));
 }