Class WikiSearcher

Allows the ability to search Wikipedia using a search query

Inheritance
WikiSearcher
Namespace: WikiDotNet
Assembly: Wiki.Net.dll
Syntax
public class WikiSearcher

Constructors

| Edit this page View Source

WikiSearcher(HttpClient?)

Creates a new WikiSearcher instance

Declaration
public WikiSearcher(HttpClient? httpClient = null)
Parameters
TypeNameDescription
HttpClienthttpClient

Set if you have a global HttpClient to use

Methods

| Edit this page View Source

Search(string, WikiSearchSettings?)

Searches Wikipedia using the given searchString

Declaration
public WikiSearchResponse Search(string searchString, WikiSearchSettings? searchSettings = null)
Parameters
TypeNameDescription
stringsearchString

The string to search for

WikiSearchSettingssearchSettings

An optional set of settings to

Returns
TypeDescription
WikiSearchResponse

A list of search results obtained from the Wikipedia API

Exceptions
TypeCondition
ArgumentOutOfRangeException

Thrown if searchString is null or whitespace.