README.md in wiki-yggdrasil-0.2.0 vs README.md in wiki-yggdrasil-0.3.0

- old
+ new

@@ -10,19 +10,39 @@ ## Usage ```ruby require 'wiki/yggdrasil' @tree = Wiki::Yggdrasil::Yggdrasil.new(uri: 'http://en.wikipedia.org/wiki/Yggdrasil') -referenced_articles = @tree.children(depth: 3) ## A hash of of articles linked by the parent +referenced_articles = @tree.children(depth: 1) ## A hash of of articles linked by the parent ``` +The preceeding code produces a structure as follows: +```ruby +{:name=>"Help:IPA/English", :children=>[]} +{:name=>"Help:IPA/English", :children=>[]} +{:name=>"Old Norse", :children=>[]} +{:name=>"Help:IPA", :children=>[]} +{:name=>"Trees in mythology", :children=>[]} +{:name=>"Norse cosmology", :children=>[]} +{:name=>"<i>Poetic Edda</i>", :children=>[]} +{:name=>"<i>Prose Edda</i>", :children=>[]} +{:name=>"Snorri Sturluson", :children=>[]} +{:name=>"<i>Fraxinus excelsior</i>", :children=>[]} +{:name=>"Æsir", :children=>[]} +{:name=>"Thing (assembly)", :children=>[]} +{:name=>"Urðarbrunnr", :children=>[]} +{:name=>"Hvergelmir", :children=>[]} +{:name=>"Mímisbrunnr", :children=>[]} +{:name=>"Níðhöggr", :children=>[]} +{:name=>"Veðrfölnir and eagle", :children=>[]} +{:name=>"Dáinn, Dvalinn, Duneyrr and Duraþrór", :children=>[]} +{:name=>"Sacred trees and groves in Germanic paganism and mythology", :children=>[]} +{:name=>"Ragnarök", :children=>[]} +``` ## FAQ ### This is taking a long time. Is that normal? Yes. This is normal. Any Yggdrasil object created with a depth of three or higher will likely take a few minutes to scrape the necessary information. - -### Why didn't you just use Wikipedia's API? -Wikipedia's API doesn't have an endpoint that allows you to programatically view the summary section of each article and its children. If it did that would obviously be the ideal choice. ## Installation Add this line to your application's Gemfile: