2017 © Pedro Peláez
 

library wikipedia

Laravel package to query Wikipedia

image

casinelli/wikipedia

Laravel package to query Wikipedia

  • Wednesday, April 4, 2018
  • by Casinelli
  • Repository
  • 1 Watchers
  • 7 Stars
  • 5,551 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 1 Versions
  • 10 % Grown

The README.md

Wikipedia

Installation

Begin by installing this package through Composer., (*1)

{
    "require": {
        "casinelli/wikipedia": "dev-master"
    }
}

Usage

Retrieve page extract, (*2)

$wikipedia = new \Casinelli\Wikipedia\Wikipedia;

return $wikipedia->search("Rome")->getSentences(5);

Same with QueryBuilder, (*3)

$qb = new \Casinelli\Wikipedia\QueryBuilder;

$qb->setFormat("php");
$qb->setTitles("Singapore");
$qb->setExtractsSentences(3);
$qb->setExtractsPlainText(true);

$response = unserialize( $qb->fetch() );

$page = reset( $response["query"]["pages"] );

return $page["extract"];

The Versions

04/04 2018

dev-master

9999999-dev

Laravel package to query Wikipedia

  Sources   Download

The Requires

 

by Avatar Casinelli