ExWikipedia.Page (ex_wikipedia v0.1.5)
ExWikipedia.page/2 delegates here. This module represents the current
implementation.
Link to this section Summary
Types
:external_links- List of fully qualified URLs to associate with the Wikipedia page.:categories- List of categories the Wikipedia page belongs to:content- String text found on Wikipedia page:images- List of relative URLs pointing to images found on the Wikipedia page:page_id- Wikipedia page id represented as an integer:revision_id- Wikipedia page revision id represented as an integer:summary- String text representing Wikipedia page's summary:title- String title of the Wikipedia page:url- Fully qualified URL of Wikipedia page:is_redirect?- Boolean. Indicates whether the content is from a page redirected from the one requested.
Functions
Fetches a Wikipedia page by its ID.
Link to this section Types
@type t() :: %ExWikipedia.Page{ categories: [String.t()], content: binary(), external_links: [String.t()], images: [String.t()], is_redirect?: boolean(), links: [String.t()], page_id: integer(), revision_id: integer(), summary: binary(), title: binary(), url: binary() }
:external_links- List of fully qualified URLs to associate with the Wikipedia page.:categories- List of categories the Wikipedia page belongs to:content- String text found on Wikipedia page:images- List of relative URLs pointing to images found on the Wikipedia page:page_id- Wikipedia page id represented as an integer:revision_id- Wikipedia page revision id represented as an integer:summary- String text representing Wikipedia page's summary:title- String title of the Wikipedia page:url- Fully qualified URL of Wikipedia page:is_redirect?- Boolean. Indicates whether the content is from a page redirected from the one requested.
Link to this section Functions
Link to this function
fetch(id, opts \\ [])
Fetches a Wikipedia page by its ID.
options
Options
:http_client: HTTP Client used to fetch Wikipedia page via Wikipedia's integer ID. Default:Elixir.HTTPoison:decoder: Decoder used to decode JSON returned from Wikipedia API. Default:Elixir.Jason:http_headers: HTTP headers that are passed into the client. Default: []:http_opts: HTTP options passed to the client. Default: []:body_key: key inside the HTTP client's response which contains the response body. This may change depending on the client used. Default:body:status_key: key inside the HTTP client's response which returns the HTTP status code. This may change depending on the client used. Default:status_code:parser: Parser used to parse response returned from client. Default:ExWikipedia.PageParser:parser_opts: Parser options passed the the parser. Default:[]. SeeExWikipedia.PageParserfor supported option.:follow_redirect: indicates whether or not the content from a redirected page constitutes a valid response. Default:true