Download the PHP package realshadow/redtube-api without Composer
On this page you can find all versions of the php package realshadow/redtube-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download realshadow/redtube-api
More information about realshadow/redtube-api
Files in realshadow/redtube-api
Package redtube-api
Short Description PHP based API wrapper for Redtube HTTP API
License MIT
Informations about the package redtube-api
Redtube API
PHP based API wrapper for Redtube HTTP API .
All methods except getStarDetailedList
are supported. This method at the time of writing always ends with an There are no stars! error.
Installation
Usage
Every method returns either a concrete object representing the response or collection of objects. Methods used for filtering videos return a Paginator
object
which contains all videos and basic informating about paging (current page, total count, last page, etc.).
Video filter
Videos can be filtered by using the VideoFilter
class which provides fluent interface. You can use one of three enumerators to ease filtering - Period
, OrderBy
, Thumbsize
.
Note: Redtube does not use traditional limit/offset queries but filtering by page. Each page contains 20 results.
For example
Get all active / deleted videos
If you want to retrieve more than one page (more than 20 videos) at once you can use these methods
Both methods return a generator after each page is requested to ease memory allocation. So the full usage example would be
Exceptions
All of the error codes listed in documentation are transformed into PHP exceptions by using this mapping
- error code 1001 =>
NoSuchMethodException
- error code 1002 =>
NoSuchDataProviderException
- error code 1003 =>
NoInputParametersSpecifiedException
- rest of the error codes will use
NotFoundException
with appropiate message
For example
All versions of redtube-api with dependencies
jms/serializer Version ^1.7
illuminate/support Version ^5.3 || ^5.4
myclabs/php-enum Version ^1.5
guzzlehttp/guzzle Version ^6.3