Struct wikipedia::Page
[−]
[src]
pub struct Page<'a, A: 'a + HttpClient> {
// some fields omitted
}Methods
impl<'a, A: HttpClient> Page<'a, A>
A wikipedia article.
fn from_title(wikipedia: &'a Wikipedia<A>, title: String) -> Page<A>
Creates a new Page given a title.
fn from_pageid(wikipedia: &'a Wikipedia<A>, pageid: String) -> Page<A>
Creates a new Page given a pageid.
fn get_pageid(&self) -> Result<String>
Gets the Page's pageid.
fn get_title(&self) -> Result<String>
Gets the Page's title.
fn get_content(&self) -> Result<String>
Gets the markdown content of the article.
fn get_html_content(&self) -> Result<String>
Gets the html content of the article.
fn get_summary(&self) -> Result<String>
Gets a summary of the article.
fn get_images(&self) -> Result<Iter<A, Image>>
Creates an iterator to view all images in the Page.
fn get_references(&self) -> Result<Iter<A, Reference>>
Creates an iterator to view all references (external links) in the Page.
fn get_links(&self) -> Result<Iter<A, Link>>
Creates an iterator to view all internal links in the Page.
fn get_categories(&self) -> Result<Iter<A, Category>>
Creates an iterator to view all categories of the Page.
fn get_coordinates(&self) -> Result<Option<(f64, f64)>>
Returns the latitude and longitude associated to the Page if any.
fn get_sections(&self) -> Result<Vec<String>>
Fetches all sections of the article.
fn get_section_content(&self, title: &str) -> Result<Option<String>>
Fetches the content of a section.