Quo*_*ent 100 google-calendar-api
我不清楚在网站上建立链接的确切格式,该链接会将单个事件添加到用户Google日历中.我看到eventbrite在这里完成了它,但我希望在正确的方向上有一些明确的规格或链接
Use*_*ser 207
以下是可用于查看格式的示例链接:
注意关键查询参数:
text
dates
details
location
Run Code Online (Sandbox Code Playgroud)
这是另一个例子(取自http://wordpress.org/support/topic/direct-link-to-add-specific-google-calendar-event):
<a href="http://www.google.com/calendar/render?
action=TEMPLATE
&text=[event-title]
&dates=[start-custom format='Ymd\\THi00\\Z']/[end-custom format='Ymd\\THi00\\Z']
&details=[description]
&location=[location]
&trp=false
&sprop=
&sprop=name:"
target="_blank" rel="nofollow">Add to my calendar</a>
Run Code Online (Sandbox Code Playgroud)
这是一个表格,可以帮助你构建这样一个链接,如果你想(在前面的答案中提到):
https://support.google.com/calendar/answer/3033039 修改:此链接不再为您提供可以使用的表单
lpt*_*ptn 11
有适用于Google日历和其他日历服务的综合文档:https : //github.com/InteractionDesignFoundation/add-event-to-calendar-docs/blob/master/services/google.md
工作链接的示例: https://calendar.google.com/calendar/render?action=TEMPLATE&text=Bithday&dates=20201231T193000Z/20201231T223000Z&details=With%20clowns%20and%20stuff&location=North%20Pole
Tes*_*ssa 10
我也成功使用了这个 URL 结构:
基本网址:
https://calendar.google.com/calendar/r/eventedit?
Run Code Online (Sandbox Code Playgroud)
假设这是我的活动详情:
Title: Event Title
Description: Example of some description. See more at /sf/ask/734218201/
Location: 123 Some Place
Date: February 22, 2020
Start Time: 10:00am
End Time: 11:30am
Timezone: America/New York (GMT -5)
Run Code Online (Sandbox Code Playgroud)
我会将我的详细信息转换为这些参数(URL 编码):
text=Event%20Title
details=Example%20of%20some%20description.%20See%20more%20at%20https%3A%2F%2Fstackoverflow.com%2Fquestions%2F10488831%2Flink-to-add-to-google-calendar
location=123%20Some%20Place%2C%20City
dates=20200222T100000/20200222T113000
ctz=America%2FNew_York
Run Code Online (Sandbox Code Playgroud)
示例链接:
请注意,由于我使用“ctz”参数指定了时区,因此我使用本地时间作为开始和结束日期。或者,您可以使用 UTC 日期并排除时区参数,如下所示:
dates=20200222T150000Z/20200222T163000Z
Run Code Online (Sandbox Code Playgroud)
示例链接:
Mik*_*ank 10
对于下一个人在 Google 上搜索此主题,我编写了一个小型 NPM 包,以便轻松生成 Google 日历 URL。它包括 TypeScript 类型定义,供需要的人使用。希望能帮助到你!
https://www.npmjs.com/package/google-calendar-url
归档时间: |
|
查看次数: |
111404 次 |
最近记录: |