{"id":15656876,"url":"https://github.com/unicodeveloper/laravel-wikipedia","last_synced_at":"2025-05-04T04:25:52.265Z","repository":{"id":57075391,"uuid":"44516434","full_name":"unicodeveloper/laravel-wikipedia","owner":"unicodeveloper","description":":package: :globe_with_meridians: A Wikipedia Package for Laravel 5","archived":false,"fork":false,"pushed_at":"2016-06-01T05:42:10.000Z","size":19,"stargazers_count":24,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-03T03:53:24.294Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unicodeveloper.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-19T06:54:50.000Z","updated_at":"2024-08-12T00:22:38.000Z","dependencies_parsed_at":"2022-08-24T14:55:42.953Z","dependency_job_id":null,"html_url":"https://github.com/unicodeveloper/laravel-wikipedia","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicodeveloper%2Flaravel-wikipedia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicodeveloper%2Flaravel-wikipedia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicodeveloper%2Flaravel-wikipedia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicodeveloper%2Flaravel-wikipedia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unicodeveloper","download_url":"https://codeload.github.com/unicodeveloper/laravel-wikipedia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252140979,"owners_count":21700773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T13:04:38.865Z","updated_at":"2025-05-03T03:53:28.073Z","avatar_url":"https://github.com/unicodeveloper.png","language":"PHP","readme":"# laravel-wikipedia\n\n[![Latest Stable Version](https://poser.pugx.org/unicodeveloper/laravel-wikipedia/v/stable.svg)](https://packagist.org/packages/unicodeveloper/laravel-wikipedia)\n![](https://img.shields.io/badge/unicodeveloper-approved-brightgreen.svg)\n[![License](https://poser.pugx.org/unicodeveloper/laravel-wikipedia/license.svg)](LICENSE.md)\n[![Build Status](https://img.shields.io/travis/unicodeveloper/laravel-wikipedia.svg)](https://travis-ci.org/unicodeveloper/laravel-wikipedia)\n[![Build Status](https://img.shields.io/travis/andela-kerinoso/laravel-wikipedia.svg)](https://travis-ci.org/andela-kerinoso/laravel-wikipedia)\n[![Quality Score](https://img.shields.io/scrutinizer/g/unicodeveloper/laravel-wikipedia.svg?style=flat-square)](https://scrutinizer-ci.com/g/unicodeveloper/laravel-wikipedia)\n[![Total Downloads](https://img.shields.io/packagist/dt/unicodeveloper/laravel-wikipedia.svg?style=flat-square)](https://packagist.org/packages/unicodeveloper/laravel-wikipedia)\n\n\u003e Laravel Package to work with Wikipedia. Very easy to use. Offers the use of Facades and Dependency Injection\n\n## Installation\n\n[PHP](https://php.net) 5.5+ or [HHVM](http://hhvm.com) 3.3+, and [Composer](https://getcomposer.org) are required.\n\nFirst, pull in the package through Composer.\n\n``` bash\n$ composer require unicodeveloper/laravel-wikipedia\n```\n\nAnother alternative is to simply add the following line to the require block of your `composer.json` file.\n\n```\n\"unicodeveloper/laravel-wikipedia\": \"1.0.*\"\n```\n\nThen run `composer install` or `composer update` to download it and have the autoloader updated.\n\nAnd then include these service providers within `config/app.php`\n\n```php\n'providers' =\u003e [\n    ...\n    Unicodeveloper\\Larapedia\\WikiRandServiceProvider::class,\n    ...\n];\n```\n\nThis package also comes with a Facade\n\n```php\n'aliases' =\u003e [\n    ...\n    'WikiRand' =\u003e Unicodeveloper\\Larapedia\\WikiRandFacade::class,\n    ...\n]\n```\n\nRun the following command, it creates a `config/wikirand.php` in your laravel app. You can modify the configuration\n\n```php\n    php artisan vendor:publish\n```\n\n## Usage\n\nUse it like so:\n\nFor those that love Facades immensely, I have provided the cake for you :smile: like so:\n\n``` php\n\n{{ WikiRand::getFirstSentence() }}  // returns 5321 Jagras è un asteroide della fascia principale.\n\n{{ WikiRand::getApiLanguage() }} // returns it\n\n{{ WikiRand::getId() }} // returns 812464\n\n{{ WikiRand::getTitle() }} // returns 5321 Jagras\n\n{{ WikiRand::getLink() }} // returns http://it.wikipedia.org/wiki/5321_Jagras\n\n{{ WikiRand::getNChar(25) }} // 5321 Jagras è un asteroide...\n\n{{ WikiRand::getCategoriesRelated() }}\n// returns\narray(3) {\n      [0]=\u003e string(42) \"Asteroidi della fascia principale centrale\"\n      [1]=\u003e string(31) \"Corpi celesti scoperti nel 1985\"\n      [2]=\u003e string(16) \"Stub - asteroidi\"\n}\n\n{{ WikiRand::getOtherLangLinks() }}\n// returns\narray(10)\n      { [0]=\u003e array(3)\n        { [\"lang\"]=\u003e string(2) \"en\"\n          [\"url\"]=\u003e string(40) \"http://en.wikipedia.org/wiki/5321_Jagras\"\n          [\"*\"]=\u003e string(11) \"5321 Jagras\" }\n        [1]=\u003e array(3) {\n          [\"lang\"]=\u003e string(2) \"eo\"\n          [\"url\"]=\u003e string(41) \"http://eo.wikipedia.org/wiki/5321_Jagraso\"\n          [\"*\"]=\u003e string(12) \"5321 Jagraso\" }\n        [2]=\u003e array(3) {\n          [\"lang\"]=\u003e string(2) \"fa\"\n          [\"url\"]=\u003e string(84) \"http://fa.wikipedia.org/wiki/%D8%B3%DB%8C%D8%A7%D8%B1%DA%A9_%DB%B5%DB%B3%DB%B2%DB%B1\"               [\"*\"]=\u003e string(19) \"سیا\" }\n        [3]=\u003e array(3) {\n          [\"lang\"]=\u003e string(2) \"hu\"\n          [\"url\"]=\u003e string(40) \"http://hu.wikipedia.org/wiki/5321_Jagras\"\n          [\"*\"]=\u003e string(11) \"5321 Jagras\" }\n        [4]=\u003e array(3) {\n          [\"lang\"]=\u003e string(2) \"hy\"\n          [\"url\"]=\u003e string(72) \"http://hy.wikipedia.org/wiki/(5321)_%D5%8B%D5%A1%D5%A3%D6%80%D5%A1%D5%BD\"\n          [\"*\"]=\u003e string(19) \"(5321) Ջագրաս\" }\n        [5]=\u003e array(3) {\n          [\"lang\"]=\u003e string(2) \"la\"\n          [\"url\"]=\u003e string(40) \"http://la.wikipedia.org/wiki/5321_Jagras\"\n          [\"*\"]=\u003e string(11) \"5321 Jagras\" }\n        [6]=\u003e array(3) {\n          [\"lang\"]=\u003e string(2) \"oc\"\n          [\"url\"]=\u003e string(40) \"http://oc.wikipedia.org/wiki/5321_Jagras\"\n          [\"*\"]=\u003e string(11) \"5321 Jagras\" }\n        [7]=\u003e array(3) {\n          [\"lang\"]=\u003e string(2) \"pl\"\n          [\"url\"]=\u003e string(42) \"http://pl.wikipedia.org/wiki/(5321)_Jagras\"\n          [\"*\"]=\u003e string(13) \"(5321) Jagras\" }\n        [8]=\u003e array(3) {\n          [\"lang\"]=\u003e string(2) \"pt\"\n          [\"url\"]=\u003e string(40) \"http://pt.wikipedia.org/wiki/5321_Jagras\"\n          [\"*\"]=\u003e string(11) \"5321 Jagras\" }\n        [9]=\u003e array(3) {\n          [\"lang\"]=\u003e string(2) \"uk\"\n          [\"url\"]=\u003e string(64) \"http://uk.wikipedia.org/wiki/5321_%D0%AF%D2%91%D1%80%D0%B0%D1%81\"\n          [\"*\"]=\u003e string(15) \"5321 Яґрас\"\n        }\n}\n\n{{ WikiRand::getPlainTextArticle() }}\n// returns\n5321 Jagras è un asteroide della fascia principale. Scoperto nel 1985, presenta un'orbita caratterizzata da un semiasse maggiore pari a 2,5810209 UA e da un'eccentricità di 0,2213576, inclinata di 13,58746° rispetto all'eclittica. Collegamenti esterni (EN) Jagras - Dati riportati nel database dell'IAU Minor Planet Center (EN) Jagras - Dati riportati nel Jet Propulsion Laboratory - Small-Body Database\n\n{{ WikiRand::getArticleImages() }}\n// returns\narray(2) {\n      [0]=\u003e string(63) \"http://upload.wikimedia.org/wikipedia/commons/8/83/Celestia.png\"\n      [1]=\u003e string(76) \"http://upload.wikimedia.org/wikipedia/commons/9/9a/Galileo_Gaspra_Mosaic.jpg\"\n}\n\n```\n\n## Change log\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Testing\n\nYou can run the tests with:\n\n```bash\nvendor/bin/phpunit run\n```\n\nAlternatively, you can run the tests like so:\n\n```bash\ncomposer test\n```\n\n## Inspiration\n\n * [WikiRandom](https://github.com/ihoru/WikiRandom)\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## How can I thank you?\n\nWhy not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or HackerNews? Spread the word!\n\nDon't forget to [follow me on twitter](https://twitter.com/unicodeveloper)!\n\nThanks!\nProsper Otemuyiwa.\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n## Security\n\nIf you discover any security related issues, please email [prosperotemuyiwa@gmail.com](prosperotemuyiwa@gmail.com) instead of using the issue tracker.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funicodeveloper%2Flaravel-wikipedia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funicodeveloper%2Flaravel-wikipedia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funicodeveloper%2Flaravel-wikipedia/lists"}