littlegiant/silverstripe-youtubefeed 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

littlegiant/silverstripe-youtubefeed

最新稳定版本:2.1.0

Composer 安装命令:

composer require littlegiant/silverstripe-youtubefeed

包简介

YouTubeFeed requests videos from an authenticated YouTube 'My Uploads' feed and converts them into YouTubeVideo DataObjects.

README 文档

README

Requests videos from an authenticated YouTube 'My Uploads' feed and converts them into YouTubeVideo DataObjects.

Features

  • Configurable auto-update interval (disabled by default)
  • CLI task YouTubeFeedTask framework/sake YouTubeFeedTask flush=all
  • Stores video information into YouTubeVideo DataObject.

Installation

Installation via composer

$ composer require littlegiant/silverstripe-youtubefeed

You're then required to create an application at Google Developers Console.

  1. Click 'Create Project'
  2. Under "APIs & auth" > "APIs" enable "YouTube Data API"
  3. Under "APIs & auth" > "Credentials" click "Add credentials" (OAuth2 Client ID) then 'Configure consent screen' and enter your project name
  4. The 'Application Type' should be 'Web application' then for 'Authorized redirect URIs' enter http://yoursitename.tld/youtube/authenticate then "Create"
  5. Enter your Client ID and Client Secret into Settings in the CMS

Options

Auto-update is disabled by default, and can be enabled within the CMS Settings "YouTube" tab.

Extending YouTube Feed

  • onAfterCreate(YouTubeVideo $videoObject)

Called after a YouTubeVideo DataObject is created as a result of being found in a playlist of the connected YouTube account.

public function onAfterCreate(YouTubeVideo $videoObject)
{
    // Do something with the newly created $videoObject
}

Contributing

Submit a pull request or issue and i'll try reply on the same working day.

Code guidelines

This project follows the standards defined in:

统计信息

  • 总下载量: 1.32k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 12
  • Watchers: 9
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-01