Get data from YouTube

1.0.0 2018-04-19 20:35 UTC

This package is auto-updated.

Last update: 2024-04-29 03:57:00 UTC


README

Example of use

Install: composer require rafael.paulino/youtube

<?php
require_once 'vendor/autoload.php';

use YouTube\CountChannelSubscribers;

//get api key here https://console.developers.google.com/apis/credentials
$api_key = 'your api key';

//get youtube channel id here: http://johnnythetank.github.io/youtube-channel-name-converter/
$channel_id = 'your channel id';

$subscribers = new CountChannelSubscribers($api_key, $channel_id);
$resultado = $subscribers->getSubscriberCount();
var_dump($resultado);