QueryChain

QueryChain

Chain API requests together

Source:

Example

// Get page summary and images in same request
wiki.page('batman').then(page => page.chain().summary().image().request()).then(console.log);

Methods

categories() → {QueryChain}

Extract categories

Source:
Returns:
Type:
QueryChain

content() → {QueryChain}

Useful for extracting structured section content

Source:
Returns:
Type:
QueryChain

coordinates() → {QueryChain}

Extract coordinates

Source:
Returns:
Type:
QueryChain

Extract external links

Source:
Returns:
Type:
QueryChain

geosearch() → {QueryChain}

Finds pages near a specific point

Source:
Returns:
Type:
QueryChain

image() → {QueryChain}

Extract image

Source:
Returns:
Type:
QueryChain

Get list of links to different translations

Source:
Returns:
Type:
QueryChain

Extract page links

Source:
Returns:
Type:
QueryChain

request() → {Object|Array}

Make combined API request

Source:
Returns:
Type:
Object | Array
  • Data object(s) depending on where the chain was created from

summary() → {QueryChain}

Useful for extracting summary content

Source:
Returns:
Type:
QueryChain