Created: 2012-03-21 05:45
Updated: 2013-10-22 12:07

CakePHP Youtube Api Plugin


  1. Clone or download to Plugin/Youtube

  2. Add your configuration to database.php and set it to the model

:: database.php ::
var $github = array(
	'datasource' => 'Youtube.Youtube',
	// These are only required for authenticated requests (write-access)
	'login' => '--Your API Key--',
	'password' => '--Your API Secret--',
	'scope' => 'user,public_repo,repo,gist' // Optional comma-separated list. Read up here:

:: my_model.php ::
var $useDbConfig = 'github';


There are a variety of options available to you, however some combinations are required (for example 'wiki' requires 'owner' and 'repo') You can get an idea what's available to you by reading the Codaset API Documentation

Read: find('all', $params)


  • owner
  • repo

Fields: pass only one of these at a time as a string

  • General
    • repos
  • User specific (owner required)
    • repos
    • followers
    • followings
    • friends
    • bookmarks
  • Repo specific (owner and repo conditions required)
    • issues


$data = $this->Model->find('all', array(
	'conditions' => array(
		'owner' => 'cakephp', 
		'repo' => 'cakephp'
	'fields' => 'commits',

Update: save()

Bold items are required

Unfollow a user


  • follow => owner


Bold items are required

Create Repo


  • type => repo
  • owner => The owner of the repo owner.
  • title => Title of the new repo.
  • description => Description of the repo.
  • state => The state of the repo. Possible values are 'public' (default), 'semi-private' or 'private'.
  • fork => A publicly accessible URL of an external Git repository that will be cloned to create this repo. Example: git://

Follow a user


  • type => follow
  • follow => owner

Delete delete()

Bold items are required

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more