Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-wiki-search

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-wiki-search

AngularJS module for consuming Wikipedia API.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

#Angular Wiki Search AngularJS module for consuming Wikipedia API.

See it in action: mudroljub.github.io/angular-wiki-search/

Install

Just download the directory and open index.html file. You can also do it developer way:

$ git clone https://github.com/mudroljub/angular-wiki-module.git
$ bower install
$ open index.html

If you don't use Bower, you can manually resolve dependencies from bower.json file.

Enjoy power searching Wikipedia!

Documentation

The main WikiController consists of two main public methods:

  • wiki.openArticle(title)
  • wiki.searchWikipedia(term)

Those methods getting data from Wikipedia API in JSONP format (see API documentation).

Both methods have those common URL params:

var params = {
    action: 'query',
    prop: 'extracts|pageimages',    // get article's content and images
    format: 'json',
    formatversion: 2,  // support utf-8
    callback: 'JSON_CALLBACK'
}

Specific params for openArticle method are:

{
    titles: title,   // title is a variable
    redirects: ''  // auto-redirecting to an article
}

Specific params for searchWikipedia method are:

{
    generator: 'search',
    gsrsearch: term,  // term is a variable
    pilimit: 'max', // enable images for all results
    exlimit: 'max', // enable content for all results
    exintro: ''    // get only article's intro
}

To-do list

  • error handling

Keywords

FAQs

Package last updated on 11 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc