【问题标题】:Filter Google Classsroom SDK -> listCoursesAnnouncements where itemDate > Today过滤 Google Classroom SDK -> listCoursesAnnouncements where itemDate > Today
【发布时间】:2021-02-16 01:40:09
【问题描述】:

我在 PHP 中使用 Google Classroom API。

我可以正确调用 API,但我可以过滤或限制 API 只查找过去 25 小时内创建的帖子吗?

例如:


<?php 
    $classroom = new Google_classroom();
    $classroom->setAccessToken($access_token);
    $service = new Google_Service_Classroom($classroom->client);
    $announcements = $service->courses_announcements->listCoursesAnnouncements($course->getId(), [
        'announcementStates' => ['PUBLISHED','DRAFT'],
        'pageSize' => 100000,
        // WHERE updateTime >= date('Y-m-d', strtotime('- 24 hours'));
    ]);

我在谷歌上搜索过,查看了文档,但在调用之前看不到过滤方法, 否则我需要查看所有帖子并过滤,但调用需要很长时间。

【问题讨论】:

    标签: google-api google-classroom


    【解决方案1】:

    答案:

    你是正确的课程。公告:列表端点没有过滤器预请求,所以你必须在后面这样做。

    功能要求:

    但是,您可以让 Google 知道这是一项对于访问他们的 API 很重要的功能,并且您想请求他们实施它。

    Google 的Issue Tracker 是开发人员报告问题并为其开发服务提出功能请求的地方,我强烈建议您在那里提出功能请求。提交此文件的最佳组件是Google Classrom component,带有Feature Request 模板。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-18
      • 1970-01-01
      相关资源
      最近更新 更多