Skip to content

Commit

Permalink
Merge pull request #6 from cluebotng/migrate-to-wikipedia-lib
Browse files Browse the repository at this point in the history
Migrate to wikipedia lib
  • Loading branch information
DamianZaremba authored Oct 18, 2021
2 parents 486c07e + 5dbdd61 commit 87fc757
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 1,574 deletions.
11 changes: 4 additions & 7 deletions cluebot3.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@

namespace ClueBot3;

require_once 'lib/http.php';
require_once 'lib/wikipedia.api.php';
require_once 'lib/wikipedia.index.php';
require_once 'lib/wikipedia.query.php';
require_once 'lib/bot.php';
require_once 'cluebot3.config.php';

Expand All @@ -42,9 +38,10 @@
)
);

$wpq = new WikipediaQuery();
$wpi = new WikipediaIndex();
$wpapi = new WikipediaApi();
$wph = new \Wikipedia\Http($logger);
$wpq = new \Wikipedia\Query($wph, $logger);
$wpi = new \Wikipedia\Index($wph, $logger);
$wpapi = new \Wikipedia\Api($wph, $logger);

$wpapi->login($user, $pass);

Expand Down
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@
"squizlabs/php_codesniffer": "@stable",
"phpmd/phpmd" : "@stable"
},
"repositories": [
{
"url": "https://github.com/cluebotng/wikipedia.git",
"type": "git"
}
],
"require": {
"monolog/monolog": "^1.17"
"monolog/monolog": "^1.17",
"cluebotng/wikipedia": "^v1.0.3"
},
"config": {
"platform": {
Expand Down
Loading

0 comments on commit 87fc757

Please sign in to comment.