Show / Hide Table of Contents

Class GoogleSearchService

Inheritance
System.Object
GoogleSearchService
Namespace: CommonBotLibrary.Services
Assembly: cs.temp.dll.dll
Syntax
public class GoogleSearchService : IWebpageService, ISearchable<IWebpage>

Constructors

GoogleSearchService(String, String)

Constructs an implementation that searches Google.

Declaration
public GoogleSearchService(string platformKey = null, string engineId = null)
Parameters
Type Name Description
System.String platformKey

Defaults to platform key in Tokens if null.

System.String engineId

Defaults to engine ID in Tokens if null.

Methods

SearchAsync(String, SafeEnum)

Searches google.com for webpages relevant to the given search term(s).

Declaration
public Task<IEnumerable<Result>> SearchAsync(string query, SafeEnum safeSearch = null)
Parameters
Type Name Description
System.String query

The query to search for.

SafeEnum safeSearch

Safe search configuration.

Returns
Type Description
Task<IEnumerable<Result>>

A collection of relevant webpages indexed on Google.

See Also
Custom Search Engine info
Back to top © 2017 - Borja Canseco