Download the PHP package igbas90/youtube-data-api without Composer
On this page you can find all versions of the php package igbas90/youtube-data-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package youtube-data-api
Youtube Data API
Support APIs
- channels.list
- commentsThread.list
- subscriptions.list
- videos.list
- playlistItems.list
- videoCategories.list
Authorization
!!! This library not supported OAuth2, only GOOGLE CONSOLE API KEY
Installation
Run in console below command to download package to your project:
Usage
Instance
Using a single shell. Services are created when they are accessed
Create only service
Set params
You can set parameters separately for each service
Bulk settings
Parameters such as apiKey, proxy, responseFormatter can be set to services when creating in the shell for this, set these parameters in the shell. After creating the services, you can change these parameters only through the methods of the service itself
Usage proxy
To use a proxy server set it to the service
Get result
Pagination
For pagination you can manually set pageToken
The package has built-in support for paging data. An ITERATOR is used for this.
!!!Attention, the client pageToken will be used as the start for the iterator
By default, the iterator works with the original service, which is not very convenient for using multiple iterators. To exclude the influence of the iterator on the service, you can set the iterator to work with the service clone. To do this, call the getIterator() method, with the parameter true.
Response format
By default, Psr\Http\Message\ResponseInterface is returned If you need to return a different format, then you can specify an object that implements the Igbas90\YoutubeDataApi\Classes\ResponseFormatter interface, which will be used to convert the returned result.
TEST
forward running the tests you need to set the environment variables in define.php, for this just copy define-example.php into define.php
replace define.php values with your values.