mcfedr/youtubelivestreamsbundle
Composer 安装命令:
composer require mcfedr/youtubelivestreamsbundle
包简介
A bundle for fetching a list of live streams
关键字:
README 文档
README
A bundle for sending tweets as push notifications
Install
Composer
php composer.phar require mcfedr/youtubelivestreamsbundle
AppKernel
Include the bundle in your AppKernel You need to also load the AWSPushBundle
public function registerBundles()
{
$bundles = array(
...
new Mcfedr\YouTube\LiveStreamsBundle\McfedrYouTubeLiveStreamsBundle(),
Routing
Setup the controllers in your routing.yml
mcfedr_you_tube_live_streams:
resource: "@McfedrYouTubeLiveStreamsBundle/Controller/"
type: annotation
prefix: /
Config
This is sample configuration, to add to your config.yml
mcfedr_you_tube_live_streams:
api_key: youtube api key
channel_id: id of the channel
cache_timeout: 3600 #cache for an hour
You might want to put something like this in your config_dev.yml
mcfedr_you_tube_live_streams:
cache_timeout: 0
Usage
You get get your list of streams
GET /streams
{
"streams": [
{
"name": "Громадське ONLINE. 6 березня",
"thumb": "https://i.ytimg.com/vi/Ou7hfc_LAeY/hqdefault.jpg",
"videoId": "Ou7hfc_LAeY"
},
{
"name": "Hromadske ONLINE RU",
"thumb": "https://i.ytimg.com/vi/O5j1mifrhK4/hqdefault.jpg",
"videoId": "O5j1mifrhK4"
}
]
}
统计信息
- 总下载量: 102
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-03-06