From d39ff6771aa528093c67b44f6d34ed3ac4d0a00f Mon Sep 17 00:00:00 2001 From: Bahaa Alhagar Date: Tue, 31 Jul 2018 17:50:22 +0200 Subject: [PATCH] service Provider - composer file --- README.md | 82 ------------------- composer.json | 20 +++-- ...{SkeletonClass.php => YoutubeUploader.php} | 0 src/YoutubeUploaderServiceProvider.php | 8 +- 4 files changed, 17 insertions(+), 93 deletions(-) rename src/{SkeletonClass.php => YoutubeUploader.php} (100%) diff --git a/README.md b/README.md index dd6941b..6c05820 100644 --- a/README.md +++ b/README.md @@ -1,83 +1 @@ # :package_name - -[![Latest Version on Packagist][ico-version]][link-packagist] -[![Software License][ico-license]](LICENSE.md) -[![Build Status][ico-travis]][link-travis] -[![Coverage Status][ico-scrutinizer]][link-scrutinizer] -[![Quality Score][ico-code-quality]][link-code-quality] -[![Total Downloads][ico-downloads]][link-downloads] - -**Note:** Replace ```:author_name``` ```:author_username``` ```:author_website``` ```:author_email``` ```:vendor``` ```:package_name``` ```:package_description``` with their correct values in [README.md](README.md), [CHANGELOG.md](CHANGELOG.md), [CONTRIBUTING.md](CONTRIBUTING.md), [LICENSE.md](LICENSE.md) and [composer.json](composer.json) files, then delete this line. You can run `$ php prefill.php` in the command line to make all replacements at once. Delete the file prefill.php as well. - -This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what -PSRs you support to avoid any confusion with users and contributors. - -## Structure - -If any of the following are applicable to your project, then the directory structure should follow industry best practices by being named the following. - -``` -bin/ -config/ -src/ -tests/ -vendor/ -``` - - -## Install - -Via Composer - -``` bash -$ composer require :vendor/:package_name -``` - -## Usage - -``` php -$skeleton = new League\Skeleton(); -echo $skeleton->echoPhrase('Hello, League!'); -``` - -## Change log - -Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. - -## Testing - -``` bash -$ composer test -``` - -## Contributing - -Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) for details. - -## Security - -If you discover any security related issues, please email :author_email instead of using the issue tracker. - -## Credits - -- [:author_name][link-author] -- [All Contributors][link-contributors] - -## License - -The MIT License (MIT). Please see [License File](LICENSE.md) for more information. - -[ico-version]: https://img.shields.io/packagist/v/:vendor/:package_name.svg?style=flat-square -[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square -[ico-travis]: https://img.shields.io/travis/:vendor/:package_name/master.svg?style=flat-square -[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/:vendor/:package_name.svg?style=flat-square -[ico-code-quality]: https://img.shields.io/scrutinizer/g/:vendor/:package_name.svg?style=flat-square -[ico-downloads]: https://img.shields.io/packagist/dt/:vendor/:package_name.svg?style=flat-square - -[link-packagist]: https://packagist.org/packages/:vendor/:package_name -[link-travis]: https://travis-ci.org/:vendor/:package_name -[link-scrutinizer]: https://scrutinizer-ci.com/g/:vendor/:package_name/code-structure -[link-code-quality]: https://scrutinizer-ci.com/g/:vendor/:package_name -[link-downloads]: https://packagist.org/packages/:vendor/:package_name -[link-author]: https://github.com/:author_username -[link-contributors]: ../../contributors diff --git a/composer.json b/composer.json index 10bbf2b..9f92a8e 100644 --- a/composer.json +++ b/composer.json @@ -1,24 +1,30 @@ { "name": "BahaaAlhagar/YoutubeUploader", "type": "library", - "description": ":package_description", + "description": ":simple Youtube wrapper", "keywords": [ "BahaaAlhagar", - "YoutubeUploader" + "Youtube Uploader", + "PHP", + "laravel", + "google api", + "youtube", ], "homepage": "https://github.com/BahaaAlhagar/YoutubeUploader", "license": "MIT", "authors": [ { - "name": ":author_name", - "email": ":author_email", - "homepage": ":author_website", + "name": ":BahaaAlhagar", + "email": ":damrawyy@yahoo.com", + "homepage": ":github.com/BahaaAlhagar", "role": "Developer" } ], "require": { - "illuminate/support": "~5.1", - "php" : "~5.6|~7.0" + "illuminate/support": "~5.4", + "php" : "~5.6|~7.0", + "google/apiclient": "^2.2", + "nesbot/carbon": "^1.22" }, "require-dev": { "phpunit/phpunit" : ">=5.4.3", diff --git a/src/SkeletonClass.php b/src/YoutubeUploader.php similarity index 100% rename from src/SkeletonClass.php rename to src/YoutubeUploader.php diff --git a/src/YoutubeUploaderServiceProvider.php b/src/YoutubeUploaderServiceProvider.php index 4bfe5c2..5fc2958 100644 --- a/src/YoutubeUploaderServiceProvider.php +++ b/src/YoutubeUploaderServiceProvider.php @@ -17,12 +17,12 @@ public function boot() } /** - * Register any package services. - * - * @return void + * Register the service provider. */ public function register() { - // + $this->app->singleton('youtubeUploader', function($app) { + return new YoutubeUploader($app, new \Google_Client); + }); } } \ No newline at end of file