dongzhao4036 2015-10-27 12:58
浏览 53

获取频道的当前CMS状态

I am currently developing a dashboard for a YouTube MCN. I just have a normal Login with youtube for the sign up, that will fetch the normal stats of a channel, ie views, subs, branding etc.

It would be easier if we could grab the CMS Status of the channels linked to the network and save it to the database, and also set up a cron job to our api so we can update these say every 12-24 hours.

I just can't find much information on how to go about this.. anywhere at all really, and I've heard its a common question.

The only scope I am currently using is: https://www.googleapis.com/auth/youtube

This is the only data I am currently saving to our database.

$_SESSION['youtube']['username']    = $channelsResponse['items'][0]['snippet']['title'];
$_SESSION['youtube']['id']          = $channelsResponse['items'][0]['id'];
$_SESSION['youtube']['description'] = $channelsResponse['items'][0]['snippet']['description'];
$_SESSION['youtube']['thumbnail']   = $channelsResponse['items'][0]['snippet']['thumbnails']['default']['url'];

$_SESSION['youtube']['banner']      = $co['items'][0]['brandingSettings']['image']['bannerImageUrl'];

$_SESSION['youtube']['views']       = $statistics['items'][0]['statistics']['viewCount'];
$_SESSION['youtube']['comments']    = $statistics['items'][0]['statistics']['commentCount'];
$_SESSION['youtube']['subscribers'] = $statistics['items'][0]['statistics']['subscriberCount'];
$_SESSION['youtube']['videos']      = $statistics['items'][0]['statistics']['videoCount'];

Thank you for your time, and I really appreciate any help I can receive!

  • 写回答

1条回答 默认 最新

  • donglaoe2979 2015-11-02 15:52
    关注

    If the channel that authenticated is in one of your content owners, you can use the contentOwnerDetails part to retrieve information about the content owner it is in. You have to include the onBehalfOfContentOwner parameter to get this information.

    If the channel is in another content owner, then there is no way to retrieve this information via the API.

    评论

报告相同问题?

悬赏问题

  • ¥20 数学建模,尽量用matlab回答,论文格式
  • ¥15 昨天挂载了一下u盘,然后拔了
  • ¥30 win from 窗口最大最小化,控件放大缩小,闪烁问题
  • ¥20 易康econgnition精度验证
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能