[google-calendar-api] Google 캘린더에 추가 할 링크

사용자 Google 캘린더에 단일 이벤트를 추가 할 웹 사이트에 링크가있는 정확한 형식에 대해 잘 모르겠습니다. eventbrite가 여기에서 해냈지만 올바른 방향으로 명확한 사양이나 링크를 원합니다.

http://www.eventbrite.com/event/1289487893

http://screencast.com/t/6vvh1khS



답변

다음은 형식을 확인하는 데 사용할 수있는 링크의 예입니다.

https://www.google.com/calendar/render?action=TEMPLATE&text=Your+Event+Name&dates=20140127T224000Z/20140320T221500Z&details=For+details,+link+here:+http://www.example.com&location=Waldorf+ Astoria, + 301 + Park + Ave +, + New + York, + NY + 10022 & sf = true & output = xml

주요 쿼리 매개 변수에 유의하십시오.

text
dates
details
location

다음은 또 다른 예입니다 ( 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>

원하는 경우 이러한 링크를 구성하는 데 도움이되는 양식이 있습니다 (이전 답변에서 언급 됨).

https://support.google.com/calendar/answer/3033039
수정 :이 링크는 더 이상 사용할 수있는 양식을 제공하지 않습니다.


답변

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


답변

이 URL 구조로도 성공했습니다.

기본 URL :

https://calendar.google.com/calendar/r/eventedit?

그리고 이것이 내 이벤트 세부 정보라고 가정 해 보겠습니다.

Title: Event Title
Description: Example of some description. See more at /programming/10488831/link-to-add-to-google-calendar
Location: 123 Some Place
Date: February 22, 2020
Start Time: 10:00am
End Time: 11:30am
Timezone: America/New York (GMT -5)

내 세부 정보를 다음 매개 변수 (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

링크 예 :

https://calendar.google.com/calendar/r/eventedit?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

“ctz”매개 변수로 시간대를 지정 했으므로 시작일과 종료일에 현지 시간을 사용했습니다. 또는 다음과 같이 UTC 날짜를 사용하고 timezone 매개 변수를 제외 할 수 있습니다.

dates=20200222T150000Z/20200222T163000Z

링크 예 :

https://calendar.google.com/calendar/r/eventedit?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 = 20200222T150000Z / 20200222T163000Z


답변

이 주제를 검색하는 다음 사람을 위해 Google 캘린더 URL을 간단하게 생성 할 수 있도록 작은 NPM 패키지를 작성했습니다. 필요한 사람들을 위해 TypeScript 유형 정의가 포함되어 있습니다. 도움이 되었기를 바랍니다.

https://www.npmjs.com/package/google-calendar-url


답변