Socket
Socket
Sign inDemoInstall

angular-wiki-search

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    angular-wiki-search

AngularJS module for consuming Wikipedia API.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
10.1 kB
Created
Weekly downloads
 

Readme

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

Last updated on 11 Jan 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc