Git Product home page Git Product logo

cakephp-youtube's Introduction

CakePHP Youtube Api Plugin

Installation

  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: http://developer.github.com/v3/oauth/#scopes
);

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

Commands

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)

Conditions:

  • 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

Example:

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

Update: save()

Bold items are required

Unfollow a user

Fields:

  • follow => owner

Create

Bold items are required

Create Repo

Fields:

  • 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://external-domain.com/repository.git

Follow a user

Fields:

  • type => follow
  • follow => owner

Delete delete()

Bold items are required

cakephp-youtube's People

Watchers

Blake E avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.