Class: Wikiscript::Client
- Inherits:
-
Object
- Object
- Wikiscript::Client
- Includes:
- LogUtils::Logging
- Defined in:
- lib/wikiscript/client.rb
Constant Summary collapse
- SITE_BASE =
'http://{lang}.wikipedia.org/w/index.php'
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Client
constructor
API_BASE = ‘en.wikipedia.org/w/api.php’.
-
#text(title) ⇒ Object
change to: wikitext why? why not? or to raw? why? why not?.
Constructor Details
#initialize(opts = {}) ⇒ Client
API_BASE = ‘en.wikipedia.org/w/api.php’
13 14 15 16 |
# File 'lib/wikiscript/client.rb', line 13 def initialize( opts={} ) @opts = opts @worker = Fetcher::Worker.new end |
Instance Method Details
#text(title) ⇒ Object
change to: wikitext why? why not? or to raw? why? why not?
19 20 21 22 |
# File 'lib/wikiscript/client.rb', line 19 def text( title ) ## todo/fix: convert spaces to _ if not present for wikipedia page title - why ?? why not ??? get( action: 'raw', title: title ) end |