gpt4 book ai didi

Perl 谷歌日历 API

转载 作者:行者123 更新时间:2023-12-02 00:11:43 25 4
gpt4 key购买 nike

我编写了一个连接到 Google 日历 API 的 Perl 脚本。我遇到了一些问题。

我想删除 > "15 Feb 2013" 事件(日期为 15 Feb 2013 的事件),我找不到变量为此,有人可以建议吗?

最佳答案

Net::Google::Calendar是与 Google Calendar API 配合使用的现有库。它有一个 delete_entry method这似乎是你想要的。

如果我理解你的问题是正确的,你想找到所有从 2013 年 2 月 15 日开始的事件并删除它们?我相信那会是……

use Net::Google::Calendar;

my $cal = Net::Google::Calendar->new;
$cal->login($username, $password);

my @events = $cal->get_events(
start-min => "2013-02-15",
);
for my $event (@events) {
$cal->delete_entry($event);
}

使用您将使用的原始 API list使用 timeMin 和 timeMax 获取条目以搜索它。那么delete它使用 eventId。

https://www.googleapis.com/calendar/v3/calendars/$calendarId/events?timeMin=2013-02-15

获取事件列表,然后...

https://www.googleapis.com/calendar/v3/calendars/$calendarId/events/$eventId

在他们每个人身上删除他们。

但您可能应该使用该模块。

关于Perl 谷歌日历 API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14928371/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com