Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
angular-wiki-search
Advanced tools
#Angular Wiki Search AngularJS module for consuming Wikipedia API.
See it in action: mudroljub.github.io/angular-wiki-search/
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!
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
}
FAQs
AngularJS module for consuming Wikipedia API.
We found that angular-wiki-search demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.