【问题标题】:Google calendar api not showing the organizer name and sending notification emails - laravel谷歌日历 api 不显示组织者名称和发送通知电子邮件 - laravel
【发布时间】:2023-04-03 07:37:01
【问题描述】:

我正在使用一个 laravel 包来集成谷歌日历 API。这样,我就可以创建只有与会者的活动。我试过创建组织者,但它没有出现。以下是我使用的代码。此处的组织者名称默认为创建 API 凭据的电子邮件,也不会发送电子邮件通知。

我使用的包是spatie/laravel-google-calendar

谁能告诉我我在这里做错了什么?

Event::create([
               'name' => 'Latest Event dsfdsfsdfsdf',
               'location' => '800 Howard St., San Francisco, CA 94103',
               'description' => 'A chance to hear more about Google\'s developer products.',           
               'startDateTime' => Carbon\Carbon::now(),
               'endDateTime' => Carbon\Carbon::now()->addHour(),
               'sendNotifications' => true,
               'sendUpdates' => 'all',
               'organizer' => array('email' => 'test@gmail.com','displayName' => 'Darshan')
               'attendees' => array(
                array('email' => 'test@gmail.com','displayName' => 'Darshan', 'organizer' => true),
                array('email' => 'darshan@test.com','displayName' => 'Ryan')
              )
            ]); 

【问题讨论】:

  • Event::create() 方法的输出是什么,还有其他日志吗?我还怀疑组织者是由配置中设置的日历的所有者自动设置的,至少我在package docsGoogle docs 中找不到有关组织者字段的任何信息

标签: laravel laravel-5 google-api google-calendar-api


【解决方案1】:

该包尚不支持添加管理器。您可以将功能添加到包中,也可以直接使用 Google ApiClient。 Google Sdk 确实有一个setOrganizer 方法,它的工作方式应该类似于在Event class 中调用的setAttendees 方法。

显然,“组织者”这个词有点用词不当,它实际上是指创建活动的日历。看看这个question,它是 cmets。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多