2017 © Pedro Peláez
 

library wiqi

Wiqi - Wikipedia api Query Interface: Laravel 5 package to perform 'action=query' requests to the Wikipedia API with ease.

image

likey/wiqi

Wiqi - Wikipedia api Query Interface: Laravel 5 package to perform 'action=query' requests to the Wikipedia API with ease.

  • Thursday, March 24, 2016
  • by KealJones
  • Repository
  • 5 Watchers
  • 1 Stars
  • 855 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 3 % Grown

The README.md

Wiqi - (Wi)kipedia API (Q)uery (I)nterface

About

This project is a Wikipedia API Query Interface for Laravel 5. A simple interface for performing "action=query" requests to the Wikipedia API., (*1)

Installation

Add to your composer.json:, (*2)

{
    "require": {
        "likey/wiqi": "dev-master"
    }
}

or from command line:, (*3)

composer require likey/wiqi

Your /config/app.php Add the service provider:, (*4)

    Likey\Wiqi\WiqiServiceProvider::class,

Example:, (*5)

'providers' => [
    Likey\Wiqi\WiqiServiceProvider::class,
],

Add the facade:, (*6)

    'Wiqi'      => Likey\Wiqi\Facades\Wiqi::class,

Example:, (*7)

'aliases' => [
    'Wiqi'      => Likey\Wiqi\Facades\Wiqi::class,
]

Usage

May change since in-dev.

get() - Return Array of Query Result:

$wiqiResults = Wiqi::query("like")->get();
print_r($wiqiResults);

count(int) - More Pages in Results:

$wiqiResults = Wiqi::query("like")->count(5)->get();
print_r($wiqiResults);

brief() - Add First Sentance and Image to Results:

$wiqiResults = Wiqi::query("like")->brief()->count(5)->get();
print_r($wiqiResults);

Example return:

[
{
"pageid": 567140,
"title": "Like",
"extract": "In the English language, the word like has a very flexible range of uses, ranging from conventional to non-standard."
},
{
"pageid": 1215338,
"title": "Like a Rolling Stone",
"extract": "\"Like a Rolling Stone\" is a 1965 song by the American singer-songwriter Bob Dylan.",
"image": "https://upload.wikimedia.org/wikipedia/en/1/1e/Bob_Dylan_-_Like_a_Rolling_Stone.jpg"
},
{
"pageid": 167924,
"title": "Like Mike",
"extract": "Like Mike is a 2002 American comedy film directed by John Schultz and written by Michael Elliot and Jordan Moffet.",
"image": "https://upload.wikimedia.org/wikipedia/en/e/ee/Like_Mike_poster.jpg"
},
{
"pageid": 28504903,
"title": "Like a G6",
"extract": "\"Like a G6\" is a 2010 song written and performed by Far East Movement, The Cataracs, and Dev, with the latter two being credited as featured artists.",
"image": "https://upload.wikimedia.org/wikipedia/en/5/59/Like_a_G6_single_cover.jpg"
},
{
"pageid": 9737001,
"title": "Like Sonny",
"extract": "Like Sonny is a compilation album combining two sessions from 1958 and 1960 with jazz musician John Coltrane.",
"image": "https://upload.wikimedia.org/wikipedia/en/f/fd/Like_Sonny.jpeg"
}
]

License

Copyright 2015 Likey, LLC., (*8)

The Versions

24/03 2016

dev-master

9999999-dev

Wiqi - Wikipedia api Query Interface: Laravel 5 package to perform 'action=query' requests to the Wikipedia API with ease.

  Sources   Download

The Requires

 

by Keal Jones @ Likey