PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of sandip   Class YouTube API   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: usage example
Class: Class YouTube API
Manage and get information from YouTube videos
Author: By
Last change:
Date: 13 years ago
Size: 1,925 bytes
 

Contents

Class file image Download
<?php

include('class/ClassYouTubeAPI.php');

$username ='ENTER_USERNAME';
$pass='ENTER_PASSWD';
$obj = new ClassYouTubeAPI();
$result = $obj->clientLoginAuth($username,$pass);
/*
echo "<br>================== createPlayList ===============<br>";
$title = 'my playlist test';
$summary = 'test description';
$result = $obj->createPlayList($title,$summary);
print_r($result);
flush();
$playlistId = 'A041299447FD961C';
$username = 'default';
echo "<pre><br>================== deletePlaylist ===============<br>";
$result = $obj->deletePlaylist($username,$playlistId);
print_r($result);
flush();
echo "<pre><br>============= getPlaylists ==============<br>";
$result = $obj->getPlaylists();
print_r($result);
echo "<br>============= getVideosbyPlayListId ==============<br>";
$result = $obj->getVideosbyPlayListId('1AC61F544EBB7E8D');
print_r($result);
flush();
echo "<pre><br>================== addVideoToPlayList mmmeuz1F0vA ===============<br>";
$playlistId = '84FF75583310004D';
$videoId = 'mmmeuz1F0vA';
$result = $obj->addVideoToPlayList($playlistId,$videoId);
print_r($result);
flush();

echo "<pre><br>================== deleteVideoFromPlayList ===============<br>";
$playlist_id = 'D18190019C51C53D';
$playlist_entry_list = '7';
$result = $obj->deleteVideoFromPlayList($playlist_id,$playlist_entry_list);
print_r($result);
flush();
echo "<br>============= getVideosbyPlayListId ==============<br>";
$result = $obj->getVideosbyPlayListId('1AC61F544EBB7E8D');
print_r($result);

flush();
$filename = 'test.mov';
$fullFilePath = 'D:\\Projects\\triveni\\myyoutube\\test.mov';
$title ='Testing Video 4';
$description ='Testing "4';
echo "<pre>";
$result = $obj->uploadVideo($filename,$fullFilePath,$title,$description);
print_r($result);



echo "<br>============= getUploadedVideos ==============<br>";
$result = $obj->getUploadedVideos();
print_r($result);
*/
?>