thewulf7 / yii2-wikipedia
There is no license information available for the latest version (v1.0) of this package.
Yii component to connect with Wikipedia
v1.0
2016-03-12 06:38 UTC
Requires
- php: >=5.4.0
- yiisoft/yii2: *
Requires (Dev)
- phpunit/php-invoker: >=1.1.0@stable
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-11-01 18:50:11 UTC
README
Installation
Begin by installing this package through Composer.
{ "require": { "thewulf7/wikipedia": "dev-master" } }
'components' => [ ... 'wikipedia' => [ 'class' => 'thewulf7\Wikipedia\Connection' ] ... ]
Usage
Retrieve page extract
$wiki = \Yii::$app->get('wikipedia'); return $wiki->createCommand()->search('Rome')->getSentences(5);
Same with QueryBuilder
$query = new \thewulf7\Wikipedia\Query(); $query ->titles('Rome'); return $query ->createCommand() ->getSentences(5);