Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.
/ rubypedia Public archive

Extracts content like field=value from Wikipedia api

Notifications You must be signed in to change notification settings

gcimmino/rubypedia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rubypedia

Rubypedia extracts content like field=value from Wikipedia API.

At the moment it works only for rvsection=0:

http://#{lang}.wikipedia.org/w/api.php?action=query&prop=revisions&titles=#{title}&rvprop=content&format=json&rvsection=0

Installation

Via command line:

$ gem install rubypedia --source https://github.com/gcimmino/rubypedia.git
$ gem install

Usage

opts = {
	:title  => 'poland',
	:fields => [ 'capital', 'currency', 'languages' ],
	:lang	=> 'en'
}

puts Rubypedia.get_content(opts) #=> "Warsaw"

About

Extracts content like field=value from Wikipedia api

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages