从 Apps 脚本 Google 获取视频观看次数 API?
Get Google Drive video view count from Apps Script API?
我有一系列视频上传到特定的 Google Drive 文件夹,我想获取每个 video/file 的观看次数。字面上就像“file_id”“10 次浏览”一样简单。
从广泛的研究来看,这似乎在今天的 Google Apps 脚本中是完全不可能的? ,Drive API 和 Drive Activity API 都只报告编辑或评论 activity,而忽略视图 activity。报告 API 确实支持这一点,但仅适用于在企业帐户中具有管理员访问权限的用户(不适用于只想知道我们自己文件的查看次数的平民)。
并且根据 this Apps Script documentation,似乎 onOpen() 触发器不会 运行 用于视图(它会阻止“view_count + 1 打开此特定文件”排序分析)。
在我放弃之前,我想我会 运行 它通过了这个出色的社区:我错过了什么吗?有没有什么方法可以获取通过 Google 云端硬盘存储和访问的视频的观看次数?
答案:
您的发现是正确的,您无法通过驱动器 API 获取视频观看次数信息。您必须使用 Admin SDK 来获取此信息。
功能请求:
但是,您可以让 Google 知道这是一项对于访问他们的 API 很重要的功能,并且您希望请求他们实现它。
Google 的 Issue Tracker is a place for developers to report issues and make feature requests for their development services, I'd urge you to make a feature request there. The best component to file this under would be the Google Drive component,使用 Feature Request
模板。
我有一系列视频上传到特定的 Google Drive 文件夹,我想获取每个 video/file 的观看次数。字面上就像“file_id”“10 次浏览”一样简单。
从广泛的研究来看,这似乎在今天的 Google Apps 脚本中是完全不可能的?
并且根据 this Apps Script documentation,似乎 onOpen() 触发器不会 运行 用于视图(它会阻止“view_count + 1 打开此特定文件”排序分析)。
在我放弃之前,我想我会 运行 它通过了这个出色的社区:我错过了什么吗?有没有什么方法可以获取通过 Google 云端硬盘存储和访问的视频的观看次数?
答案:
您的发现是正确的,您无法通过驱动器 API 获取视频观看次数信息。您必须使用 Admin SDK 来获取此信息。
功能请求:
但是,您可以让 Google 知道这是一项对于访问他们的 API 很重要的功能,并且您希望请求他们实现它。
Google 的 Issue Tracker is a place for developers to report issues and make feature requests for their development services, I'd urge you to make a feature request there. The best component to file this under would be the Google Drive component,使用 Feature Request
模板。