youtube 分析服务报告参数 [英] youtube analyticsService Report parameters

查看:31
本文介绍了youtube 分析服务报告参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与 google 进行身份验证以尝试获取 youtube 分析,我的问题是我不知道如何在查询 youtube 时为您填写参数在这里,我正在创建一个新服务:然后尝试查询它

我不确定在ids"参数中放什么或在哪里可以找到它?我在那里放什么?

_analyticService = new YoutubeAnalyticsService(_authenticator = CreateAuthenticator());..._analyticService.Reports.Query("ids", "2013-01-01", "2013-02-02", "views").Fetch();

解决方案

ids 参数是一个带有你频道 id 的表达式.如果您转到 http://www.youtube.com/analytics 并单击您自己的标题频道名称,您会得到一个类似于 http://www.youtube.com/channel/UCYHMS8hN8s49F93iJuEgG6w 的链接最后一部分是您频道的 ID.您必须将其用作channel==UCYHMS8hN8s49F93iJuEgG6w"等表达式中的 ids 参数.这是在您自己的频道的上下文中进行查询.这是必需的,因为您可能有权访问多个频道.

我可以通过以下方式查询我的一个视频的观看次数:https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3DUCYHMS8hN8s49F93iJuEgG6w&start-date=2013-01-01&end-date=2013-02-02&=metrics=views&dimension视频%3D%3D_iwmv6644dA&sort=day&key={YOUR_API_KEY}

尝试使用本页底部的 API 资源管理器,那里也有一些解释不同参数的文字.https://developers.google.com/youtube/analytics/v1/>

希望一切顺利!

I am authenticating with google to try and get youtube analytics my problem is that i don't know how to filled you the parameters when quering youtube here i am making a new service: and then try to query it

I am not sure what to put in the "ids" parameter or where to find it? What do I put there?

_analyticService = new YoutubeAnalyticsService(_authenticator = CreateAuthenticator()); ... _analyticService.Reports.Query("ids", "2013-01-01", "2013-02-02", "views").Fetch();

解决方案

The ids parameter is the an expression with the id of your channel. If you go to http://www.youtube.com/analytics and click on the title with your own channel name, you get a link like http://www.youtube.com/channel/UCYHMS8hN8s49F93iJuEgG6w The last part is the id of your channel. You have to use this as the ids parameter in an expression like "channel==UCYHMS8hN8s49F93iJuEgG6w". This is to query in the context of your own channel. This is needed as you might have access to several channels.

I can query views for one of my videos by: https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3DUCYHMS8hN8s49F93iJuEgG6w&start-date=2013-01-01&end-date=2013-02-02&metrics=views&dimensions=day&filters=video%3D%3D_iwmv6644dA&sort=day&key={YOUR_API_KEY}

Try to use the API explorer at the bottom of this page, there are some text explaining the different parameters there as well. https://developers.google.com/youtube/analytics/v1/

Hope it goes well!

这篇关于youtube 分析服务报告参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆