इससे उस कैलेंडर के बारे में पता चलता है जिसका मालिकाना हक उपयोगकर्ता के पास है या जिसकी उसने सदस्यता ली है.
तरीके
| तरीका | रिटर्न टाइप | संक्षिप्त विवरण |
|---|---|---|
create | Calendar | इससे पूरे दिन चलने वाला नया इवेंट बनाया जाता है. |
create | Calendar | इससे पूरे दिन चलने वाला एक नया इवेंट बनाया जाता है. यह इवेंट कई दिनों तक चल सकता है. |
create | Calendar | इससे पूरे दिन चलने वाला एक नया इवेंट बनाया जाता है. यह इवेंट कई दिनों तक चल सकता है. |
create | Calendar | इससे पूरे दिन चलने वाला नया इवेंट बनाया जाता है. |
create | Calendar | इससे पूरे दिन चलने वाले इवेंट की नई सीरीज़ बनाई जाती है. |
create | Calendar | इससे पूरे दिन चलने वाले इवेंट की नई सीरीज़ बनाई जाती है. |
create | Calendar | यह कुकी, नया इवेंट बनाती है. |
create | Calendar | यह कुकी, नया इवेंट बनाती है. |
create | Calendar | यह फ़्री-फ़ॉर्म ब्यौरे से इवेंट बनाता है. |
create | Calendar | यह कुकी, नई इवेंट सीरीज़ बनाती है. |
create | Calendar | यह कुकी, नई इवेंट सीरीज़ बनाती है. |
delete | void | यह कैलेंडर को हमेशा के लिए मिटा देता है. |
get | String | इससे कैलेंडर का रंग मिलता है. |
get | String | कैलेंडर की जानकारी मिलती है. |
get | Calendar | इस तरीके का इस्तेमाल करके, दिए गए आईडी वाला इवेंट पाया जा सकता है. |
get | Calendar | इस तरीके से, दिए गए आईडी वाली इवेंट सीरीज़ मिलती है. |
get | Calendar | इससे किसी तय समयसीमा के अंदर होने वाले सभी इवेंट का डेटा मिलता है. |
get | Calendar | यह फ़ंक्शन, तय की गई समयसीमा में होने वाले उन सभी इवेंट को दिखाता है जो तय की गई शर्तों को पूरा करते हैं. |
get | Calendar | किसी दिन होने वाले सभी इवेंट का डेटा मिलता है. |
get | Calendar | यह फ़ंक्शन, किसी दिन होने वाले उन सभी इवेंट को दिखाता है जो तय की गई शर्तों को पूरा करते हैं. |
get | String | इस कुकी का इस्तेमाल कैलेंडर का आईडी पाने के लिए किया जाता है. |
get | String | कैलेंडर का नाम मिलता है. |
get | String | कैलेंडर का टाइम ज़ोन मिलता है. |
is | Boolean | इस कुकी से यह तय होता है कि कैलेंडर को यूज़र इंटरफ़ेस में छिपाया गया है या नहीं. |
is | Boolean | इस कुकी से यह पता चलता है कि कैलेंडर, उपयोगकर्ता का मुख्य कैलेंडर है या नहीं. |
is | Boolean | यह कुकी यह तय करती है कि कैलेंडर का मालिकाना हक आपके पास है या नहीं. |
is | Boolean | इस कुकी से यह तय होता है कि कैलेंडर के इवेंट, यूज़र इंटरफ़ेस में दिखेंगे या नहीं. |
set | Calendar | इससे कैलेंडर का रंग सेट किया जाता है. |
set | Calendar | इस कुकी का इस्तेमाल, किसी कैलेंडर की जानकारी सेट करने के लिए किया जाता है. |
set | Calendar | इस कुकी से यह तय होता है कि कैलेंडर, यूज़र इंटरफ़ेस में दिखेगा या नहीं. |
set | Calendar | यह कुकी, कैलेंडर का नाम सेट करती है. |
set | Calendar | इस सेटिंग से यह तय होता है कि कैलेंडर के इवेंट, यूज़र इंटरफ़ेस में दिखेंगे या नहीं. |
set | Calendar | कैलेंडर का टाइम ज़ोन सेट करता है. |
unsubscribe | void | इस फ़ंक्शन का इस्तेमाल करके, उपयोगकर्ता को किसी कैलेंडर की सदस्यता से हटाया जा सकता है. |
ज़्यादा जानकारी वाला दस्तावेज़
createAllDayEvent(title, date)
इससे पूरे दिन चलने वाला नया इवेंट बनाया जाता है.
// Creates an all-day event for the moon landing and logs the ID. const event = CalendarApp.getDefaultCalendar().createAllDayEvent( 'Apollo 11 Landing', new Date('July 20, 1969'), ); Logger.log(`Event ID: ${event.getId()}`);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
title | String | इवेंट का टाइटल. |
date | Date | इवेंट की तारीख (सिर्फ़ दिन का इस्तेमाल किया जाता है; समय को अनदेखा किया जाता है). |
वापसी का टिकट
CalendarEvent — बनाया गया इवेंट.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
createAllDayEvent(title, startDate, endDate)
इससे पूरे दिन चलने वाला एक नया इवेंट बनाया जाता है. यह इवेंट कई दिनों तक चल सकता है.
// Creates an all-day event for the Woodstock festival (August 15th to 17th) and // logs the ID. const event = CalendarApp.getDefaultCalendar().createAllDayEvent( 'Woodstock Festival', new Date('August 15, 1969'), new Date('August 18, 1969'), ); Logger.log(`Event ID: ${event.getId()}`);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
title | String | इवेंट का टाइटल. |
start | Date | इवेंट के शुरू होने की तारीख. इसमें सिर्फ़ दिन का इस्तेमाल किया जाता है. समय को अनदेखा कर दिया जाता है. |
end | Date | इवेंट के खत्म होने की तारीख. इसमें सिर्फ़ दिन का इस्तेमाल किया जाता है. समय को अनदेखा कर दिया जाता है. खत्म होने की तारीख शामिल नहीं होती. |
वापसी का टिकट
CalendarEvent — बनाया गया इवेंट.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
createAllDayEvent(title, startDate, endDate, options)
इससे पूरे दिन चलने वाला एक नया इवेंट बनाया जाता है. यह इवेंट कई दिनों तक चल सकता है.
// Creates an all-day event for the Woodstock festival (August 15th to 17th) and // logs the ID. const event = CalendarApp.getDefaultCalendar().createAllDayEvent( 'Woodstock Festival', new Date('August 15, 1969'), new Date('August 18, 1969'), {location: 'Bethel, White Lake, New York, U.S.', sendInvites: true}, ); Logger.log(`Event ID: ${event.getId()}`);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
title | String | इवेंट का टाइटल. |
start | Date | इवेंट के शुरू होने की तारीख. इसमें सिर्फ़ दिन का इस्तेमाल किया जाता है. समय को अनदेखा कर दिया जाता है. |
end | Date | इवेंट के खत्म होने की तारीख. इसमें सिर्फ़ दिन का इस्तेमाल किया जाता है. समय को अनदेखा कर दिया जाता है. खत्म होने की तारीख शामिल नहीं होती. |
options | Object | यह एक JavaScript ऑब्जेक्ट है, जो नीचे दिए गए बेहतर पैरामीटर तय करता है. |
उन्नत पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
description | String | इवेंट के बारे में जानकारी. |
location | String | इवेंट की जगह. |
guests | String | कॉमा लगाकर अलग किए गए ईमेल पतों की सूची. इन ईमेल पतों को मेहमान के तौर पर जोड़ा जाना चाहिए. |
send | Boolean | न्योते के ईमेल भेजने हैं या नहीं (डिफ़ॉल्ट: false). |
वापसी का टिकट
CalendarEvent — बनाया गया इवेंट.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
createAllDayEvent(title, date, options)
इससे पूरे दिन चलने वाला नया इवेंट बनाया जाता है.
// Creates an all-day event for the moon landing and logs the ID. const event = CalendarApp.getDefaultCalendar().createAllDayEvent( 'Apollo 11 Landing', new Date('July 20, 1969'), {location: 'The Moon'}, ); Logger.log(`Event ID: ${event.getId()}`);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
title | String | इवेंट का टाइटल. |
date | Date | इवेंट की तारीख (सिर्फ़ दिन का इस्तेमाल किया जाता है; समय को अनदेखा किया जाता है). |
options | Object | यह एक JavaScript ऑब्जेक्ट है, जो नीचे दिए गए बेहतर पैरामीटर तय करता है. |
उन्नत पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
description | String | इवेंट के बारे में जानकारी. |
location | String | इवेंट की जगह. |
guests | String | कॉमा लगाकर अलग किए गए ईमेल पतों की सूची. इन ईमेल पतों को मेहमान के तौर पर जोड़ा जाना चाहिए. |
send | Boolean | न्योते के ईमेल भेजने हैं या नहीं (डिफ़ॉल्ट: false). |
वापसी का टिकट
CalendarEvent — बनाया गया इवेंट.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
createAllDayEventSeries(title, startDate, recurrence)
इससे पूरे दिन चलने वाले इवेंट की नई सीरीज़ बनाई जाती है.
// Creates an event series for a no-meetings day, taking place every Wednesday // in 2013. const eventSeries = CalendarApp.getDefaultCalendar().createAllDayEventSeries( 'No Meetings', new Date('January 2, 2013 03:00:00 PM EST'), CalendarApp.newRecurrence() .addWeeklyRule() .onlyOnWeekday(CalendarApp.Weekday.WEDNESDAY) .until(new Date('January 1, 2014')), ); Logger.log(`Event Series ID: ${eventSeries.getId()}`);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
title | String | सीरीज़ में मौजूद इवेंट का टाइटल |
start | Date | सीरीज़ में शामिल पहले इवेंट की तारीख (सिर्फ़ दिन का इस्तेमाल किया जाता है; समय को अनदेखा कर दिया जाता है) |
recurrence | Event | इवेंट सीरीज़ के बार-बार होने की सेटिंग |
वापसी का टिकट
CalendarEventSeries — बनाई गई इवेंट सीरीज़
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
createAllDayEventSeries(title, startDate, recurrence, options)
इससे पूरे दिन चलने वाले इवेंट की नई सीरीज़ बनाई जाती है.
// Creates an event series for a no-meetings day, taking place every Wednesday // in 2013. const eventSeries = CalendarApp.getDefaultCalendar().createAllDayEventSeries( 'No Meetings', new Date('January 2, 2013 03:00:00 PM EST'), CalendarApp.newRecurrence() .addWeeklyRule() .onlyOnWeekday(CalendarApp.Weekday.WEDNESDAY) .until(new Date('January 1, 2014')), {guests: 'everyone@example.com'}, ); Logger.log(`Event Series ID: ${eventSeries.getId()}`);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
title | String | सीरीज़ में मौजूद इवेंट का टाइटल |
start | Date | सीरीज़ में शामिल पहले इवेंट की तारीख (सिर्फ़ दिन का इस्तेमाल किया जाता है; समय को अनदेखा कर दिया जाता है) |
recurrence | Event | इवेंट सीरीज़ के बार-बार होने की सेटिंग |
options | Object | एक JavaScript ऑब्जेक्ट, जिसमें नीचे दिए गए अडवांस पैरामीटर शामिल होते हैं |
उन्नत पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
description | String | सीरीज़ के इवेंट की जानकारी |
location | String | सीरीज़ के इवेंट की जगह |
guests | String | कॉमा लगाकर अलग किए गए ईमेल पतों की सूची, जिन्हें सीरीज़ के इवेंट में मेहमान के तौर पर जोड़ना है |
send | Boolean | न्योते के ईमेल भेजने हैं या नहीं (डिफ़ॉल्ट: false) |
वापसी का टिकट
CalendarEventSeries — बनाई गई इवेंट सीरीज़
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
createEvent(title, startTime, endTime)
यह कुकी, नया इवेंट बनाती है.
अगर कोई टाइम ज़ोन नहीं दिया गया है, तो समय की वैल्यू को स्क्रिप्ट के टाइम ज़ोन के हिसाब से माना जाता है. यह कैलेंडर के टाइम ज़ोन से अलग हो सकता है.
// Creates an event for the moon landing and logs the ID. const event = CalendarApp.getDefaultCalendar().createEvent( 'Apollo 11 Landing', new Date('July 20, 1969 20:00:00 UTC'), new Date('July 21, 1969 21:00:00 UTC'), ); Logger.log(`Event ID: ${event.getId()}`);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
title | String | इवेंट का टाइटल |
start | Date | इवेंट के शुरू होने की तारीख और समय |
end | Date | इवेंट के खत्म होने की तारीख और समय |
वापसी का टिकट
CalendarEvent — बनाया गया इवेंट
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
createEvent(title, startTime, endTime, options)
यह कुकी, नया इवेंट बनाती है.
अगर कोई टाइम ज़ोन नहीं दिया गया है, तो समय की वैल्यू को स्क्रिप्ट के टाइम ज़ोन के हिसाब से माना जाता है. यह कैलेंडर के टाइम ज़ोन से अलग हो सकता है.
// Creates an event for the moon landing and logs the ID. const event = CalendarApp.getDefaultCalendar().createEvent( 'Apollo 11 Landing', new Date('July 20, 1969 20:00:00 UTC'), new Date('July 20, 1969 21:00:00 UTC'), {location: 'The Moon'}, ); Logger.log(`Event ID: ${event.getId()}`);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
title | String | इवेंट का टाइटल |
start | Date | इवेंट के शुरू होने की तारीख और समय |
end | Date | इवेंट के खत्म होने की तारीख और समय |
options | Object | एक JavaScript ऑब्जेक्ट, जिसमें नीचे दिए गए अडवांस पैरामीटर शामिल होते हैं |
उन्नत पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
description | String | इवेंट की जानकारी |
location | String | इवेंट की जगह |
guests | String | कॉमा लगाकर अलग किए गए ईमेल पतों की सूची, जिन्हें मेहमान के तौर पर जोड़ा जाना चाहिए |
send | Boolean | न्योते के ईमेल भेजने हैं या नहीं (डिफ़ॉल्ट: false) |
वापसी का टिकट
CalendarEvent — बनाया गया इवेंट
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
createEventFromDescription(description)
यह फ़्री-फ़ॉर्म ब्यौरे से इवेंट बनाता है.
ब्यौरे में वही फ़ॉर्मैट इस्तेमाल किया जाना चाहिए जो यूज़र इंटरफ़ेस (यूआई) की "जल्दी जोड़ें" सुविधा में इस्तेमाल किया जाता है.
// Creates a new event and logs its ID. const event = CalendarApp.getDefaultCalendar().createEventFromDescription( 'Lunch with Mary, Friday at 1PM', ); Logger.log(`Event ID: ${event.getId()}`);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
description | String | इवेंट के बारे में जानकारी |
वापसी का टिकट
CalendarEvent — बनाया गया इवेंट
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
createEventSeries(title, startTime, endTime, recurrence)
यह कुकी, नई इवेंट सीरीज़ बनाती है.
// Creates an event series for a team meeting, taking place every Tuesday and // Thursday in 2013. const eventSeries = CalendarApp.getDefaultCalendar().createEventSeries( 'Team Meeting', new Date('January 1, 2013 03:00:00 PM EST'), new Date('January 1, 2013 04:00:00 PM EST'), CalendarApp.newRecurrence() .addWeeklyRule() .onlyOnWeekdays( [CalendarApp.Weekday.TUESDAY, CalendarApp.Weekday.THURSDAY]) .until(new Date('January 1, 2014')), ); Logger.log(`Event Series ID: ${eventSeries.getId()}`);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
title | String | सीरीज़ में मौजूद इवेंट का टाइटल |
start | Date | सीरीज़ का पहला इवेंट शुरू होने की तारीख और समय |
end | Date | सीरीज़ का पहला इवेंट खत्म होने की तारीख और समय |
recurrence | Event | इवेंट सीरीज़ के बार-बार होने की सेटिंग |
वापसी का टिकट
CalendarEventSeries — बनाई गई इवेंट सीरीज़
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
createEventSeries(title, startTime, endTime, recurrence, options)
यह कुकी, नई इवेंट सीरीज़ बनाती है.
// Creates an event series for a team meeting, taking place every Tuesday and // Thursday in 2013. const eventSeries = CalendarApp.getDefaultCalendar().createEventSeries( 'Team Meeting', new Date('January 1, 2013 03:00:00 PM EST'), new Date('January 1, 2013 04:00:00 PM EST'), CalendarApp.newRecurrence() .addWeeklyRule() .onlyOnWeekdays( [CalendarApp.Weekday.TUESDAY, CalendarApp.Weekday.THURSDAY]) .until(new Date('January 1, 2014')), {location: 'Conference Room'}, ); Logger.log(`Event Series ID: ${eventSeries.getId()}`);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
title | String | सीरीज़ में मौजूद इवेंट का टाइटल |
start | Date | सीरीज़ का पहला इवेंट शुरू होने की तारीख और समय |
end | Date | सीरीज़ का पहला इवेंट खत्म होने की तारीख और समय |
recurrence | Event | इवेंट सीरीज़ के बार-बार होने की सेटिंग |
options | Object | एक JavaScript ऑब्जेक्ट, जिसमें नीचे दिए गए अडवांस पैरामीटर शामिल होते हैं |
उन्नत पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
description | String | सीरीज़ के इवेंट की जानकारी |
location | String | सीरीज़ के इवेंट की जगह |
guests | String | कॉमा लगाकर अलग किए गए ईमेल पतों की सूची, जिन्हें सीरीज़ के इवेंट में मेहमान के तौर पर जोड़ना है |
send | Boolean | न्योते के ईमेल भेजने हैं या नहीं (डिफ़ॉल्ट: false) |
वापसी का टिकट
CalendarEventSeries — बनाई गई इवेंट सीरीज़
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
deleteCalendar()
यह कैलेंडर को हमेशा के लिए मिटा देता है. कोई उपयोगकर्ता सिर्फ़ उस कैलेंडर को मिटा सकता है जिसका मालिकाना हक उसके पास है.
// Creates a calendar to delete. const calendar = CalendarApp.createCalendar('Test'); // Deletes the 'Test' calendar permanently. calendar.deleteCalendar();
थ्रॉ
Error — अगर यह इंपोर्ट किया गया कैलेंडर है.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
getColor()
इससे कैलेंडर का रंग मिलता है.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById('222larabrown@gmail.com'); // Gets the color of the calendar and logs it to the console. // For the default calendar, you can use CalendarApp.getColor() instead. const calendarColor = calendar.getColor(); console.log(calendarColor);
वापसी का टिकट
String — हेक्साडेसिमल रंग की स्ट्रिंग ("#rrggbb").
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getDescription()
कैलेंडर की जानकारी मिलती है.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById('222larabrown@gmail.com'); // Sets the description of the calendar to 'Test description.' calendar.setDescription('Test description'); // Gets the description of the calendar and logs it to the console. // For the default calendar, you can use CalendarApp.getDescription() instead. const description = calendar.getDescription(); console.log(description);
वापसी का टिकट
String — इस कैलेंडर की जानकारी.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getEventById(iCalId)
इस तरीके का इस्तेमाल करके, दिए गए आईडी वाला इवेंट पाया जा सकता है. अगर सीरीज़, डिफ़ॉल्ट कैलेंडर के अलावा किसी दूसरे कैलेंडर से जुड़ी है, तो इस तरीके को उस कैलेंडर से कॉल किया जाना चाहिए. CalendarApp.getEventById(iCalId) को कॉल करने पर, सिर्फ़ डिफ़ॉल्ट कैलेंडर में मौजूद इवेंट दिखता है.
अगर कई इवेंट, इवेंट सीरीज़ का हिस्सा हैं, तो उनका आईडी एक ही हो सकता है. इस मामले में, यह तरीका उस सीरीज़ का सिर्फ़ पहला इवेंट दिखाता है.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById('222larabrown@gmail.com'); // Creates an event for the moon landing. const event = calendar.createEvent( 'Apollo 11 Landing', new Date('July 20, 1969 20:05:00 UTC'), new Date('July 20, 1969 20:17:00 UTC'), ); // Gets the calendar event ID and logs it to the console. const iCalId = event.getId(); console.log(iCalId); // Gets the event by its ID and logs the title of the event to the console. // For the default calendar, you can use CalendarApp.getEventById(iCalId) // instead. const myEvent = calendar.getEventById(iCalId); console.log(myEvent.getTitle());
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
iCalId | String | इवेंट का आईडी. |
वापसी का टिकट
CalendarEvent — दिए गए आईडी वाला इवेंट या null, अगर इवेंट मौजूद नहीं है या उपयोगकर्ता के पास इसे ऐक्सेस करने की अनुमति नहीं है.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getEventSeriesById(iCalId)
इस तरीके से, दिए गए आईडी वाली इवेंट सीरीज़ मिलती है. अगर दिया गया आईडी किसी एक CalendarEvent के लिए है, तो CalendarEventSeries को सीरीज़ के किसी एक इवेंट के साथ दिखाया जाता है. ध्यान दें कि अगर इवेंट सीरीज़, डिफ़ॉल्ट कैलेंडर के अलावा किसी दूसरे कैलेंडर से जुड़ी है, तो इस तरीके को उस Calendar से कॉल किया जाना चाहिए. सीधे CalendarApp.getEventSeriesById(iCalId) को कॉल करने पर, सिर्फ़ डिफ़ॉल्ट कैलेंडर में मौजूद इवेंट सीरीज़ मिलती है.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById('222larabrown@gmail.com'); // Creates an event series for a daily team meeting from 1 PM to 2 PM. // The series adds the daily event from January 1, 2023 through December 31, // 2023. const eventSeries = calendar.createEventSeries( 'Team meeting', new Date('Jan 1, 2023 13:00:00'), new Date('Jan 1, 2023 14:00:00'), CalendarApp.newRecurrence().addDailyRule().until(new Date('Jan 1, 2024')), ); // Gets the ID of the event series. const iCalId = eventSeries.getId(); // Gets the event series by its ID and logs the series title to the console. // For the default calendar, you can use CalendarApp.getEventSeriesById(iCalId) // instead. console.log(calendar.getEventSeriesById(iCalId).getTitle());
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
iCalId | String | इवेंट सीरीज़ का आईडी. |
वापसी का टिकट
CalendarEventSeries — दिए गए आईडी वाली सीरीज़ या null. ऐसा तब होता है, जब सीरीज़ मौजूद न हो या उपयोगकर्ता के पास उसका ऐक्सेस न हो.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getEvents(startTime, endTime)
इससे किसी तय समयसीमा के अंदर होने वाले सभी इवेंट का डेटा मिलता है.
यह तरीका, उन इवेंट को दिखाता है जो दी गई समयावधि के दौरान शुरू होते हैं, समयावधि के दौरान खत्म होते हैं या समयावधि को शामिल करते हैं. अगर कोई टाइम ज़ोन नहीं बताया जाता है, तो समय की वैल्यू को स्क्रिप्ट के टाइम ज़ोन के हिसाब से समझा जाता है. यह कैलेंडर के टाइम ज़ोन से अलग हो सकता है.
// Determines how many events are happening in the next two hours. const now = new Date(); const twoHoursFromNow = new Date(now.getTime() + 2 * 60 * 60 * 1000); const events = CalendarApp.getDefaultCalendar().getEvents(now, twoHoursFromNow); Logger.log(`Number of events: ${events.length}`);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
start | Date | समयसीमा की शुरुआत |
end | Date | समयसीमा खत्म होने का समय, इसमें शामिल नहीं है |
वापसी का टिकट
CalendarEvent[] — समयसीमा के अंदर होने वाले इवेंट
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getEvents(startTime, endTime, options)
यह फ़ंक्शन, तय की गई समयसीमा में होने वाले उन सभी इवेंट को दिखाता है जो तय की गई शर्तों को पूरा करते हैं.
यह तरीका, उन इवेंट को दिखाता है जो दी गई समयावधि के दौरान शुरू होते हैं, समयावधि के दौरान खत्म होते हैं या समयावधि को शामिल करते हैं. अगर कोई टाइम ज़ोन नहीं बताया जाता है, तो समय की वैल्यू को स्क्रिप्ट के टाइम ज़ोन के हिसाब से समझा जाता है. यह कैलेंडर के टाइम ज़ोन से अलग हो सकता है.
ध्यान दें कि author, search या statusFilters पर फ़िल्टर करने की सुविधा, start और max लागू करने के बाद मिलती है. इसका मतलब है कि भले ही अतिरिक्त इवेंट, शर्तों को पूरा करते हों, लेकिन लौटाए गए इवेंट की संख्या max से कम हो सकती है.
// Determines how many events are happening in the next two hours that contain // the term "meeting". const now = new Date(); const twoHoursFromNow = new Date(now.getTime() + 2 * 60 * 60 * 1000); const events = CalendarApp.getDefaultCalendar().getEvents( now, twoHoursFromNow, {search: 'meeting'}, ); Logger.log(`Number of events: ${events.length}`);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
start | Date | समयसीमा की शुरुआत |
end | Date | समयसीमा खत्म होने का समय, इसमें शामिल नहीं है |
options | Object | एक JavaScript ऑब्जेक्ट, जिसमें नीचे दिए गए अडवांस पैरामीटर शामिल होते हैं |
उन्नत पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
start | Integer | लौटाए जाने वाले पहले इवेंट का इंडेक्स |
max | Integer | ज़्यादा से ज़्यादा इवेंट वापस लाने की संख्या |
author | String | वह ईमेल पता जिसका इस्तेमाल इवेंट बनाने वाले व्यक्ति के हिसाब से नतीजों को फ़िल्टर करने के लिए किया जाता है |
search | String | नतीजों को फ़िल्टर करने के लिए इस्तेमाल की गई फ़ुल-टेक्स्ट सर्च क्वेरी |
status | Guest | नतीजों को फ़िल्टर करने के लिए इस्तेमाल किए गए स्टेटस की एक कैटगरी |
वापसी का टिकट
CalendarEvent[] — वे इवेंट जो समयसीमा के अंदर होते हैं और शर्तों के मुताबिक होते हैं
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getEventsForDay(date)
किसी दिन होने वाले सभी इवेंट का डेटा मिलता है.
यह तरीका, इवेंट शुरू होने, खत्म होने या पूरे दिन चलने पर इवेंट दिखाता है.
ध्यान दें कि Date ऑब्जेक्ट के सिर्फ़ तारीख वाले हिस्से का इस्तेमाल किया जाता है. समय वाले हिस्से को अनदेखा कर दिया जाता है. तारीख को कैलेंडर के टाइम ज़ोन के हिसाब से, उस दिन की आधी रात से लेकर अगले दिन की आधी रात तक माना जाता है.
// Determines how many events are happening today. const today = new Date(); const events = CalendarApp.getDefaultCalendar().getEventsForDay(today); Logger.log(`Number of events: ${events.length}`);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
date | Date | वह तारीख जिसके लिए इवेंट वापस पाने हैं (सिर्फ़ दिन का इस्तेमाल किया जाता है; समय को अनदेखा किया जाता है) |
वापसी का टिकट
CalendarEvent[] — दी गई तारीख पर होने वाले इवेंट
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getEventsForDay(date, options)
यह फ़ंक्शन, किसी दिन होने वाले उन सभी इवेंट को दिखाता है जो तय की गई शर्तों को पूरा करते हैं.
यह तरीका, इवेंट शुरू होने, खत्म होने या पूरे दिन चलने पर इवेंट दिखाता है.
ध्यान दें कि Date ऑब्जेक्ट के सिर्फ़ तारीख वाले हिस्से का इस्तेमाल किया जाता है. समय वाले हिस्से को अनदेखा कर दिया जाता है. तारीख को कैलेंडर के टाइम ज़ोन के हिसाब से, उस दिन की आधी रात से लेकर अगले दिन की आधी रात तक माना जाता है.
ध्यान दें कि author, search या statusFilters पर फ़िल्टर करने की सुविधा, start और max लागू करने के बाद मिलती है. इसका मतलब है कि भले ही अतिरिक्त इवेंट, शर्तों को पूरा करते हों, लेकिन लौटाए गए इवेंट की संख्या max से कम हो सकती है.
// Determines how many events are happening today and contain the term // "meeting". const today = new Date(); const events = CalendarApp.getDefaultCalendar().getEventsForDay(today, { search: 'meeting', }); Logger.log(`Number of events: ${events.length}`);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
date | Date | वह तारीख जिसके लिए इवेंट वापस पाने हैं (सिर्फ़ दिन का इस्तेमाल किया जाता है; समय को अनदेखा किया जाता है) |
options | Object | फ़िल्टर करने के बेहतर विकल्प |
उन्नत पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
start | Integer | लौटाए जाने वाले पहले इवेंट का इंडेक्स |
max | Integer | ज़्यादा से ज़्यादा इवेंट वापस लाने की संख्या |
author | String | वह ईमेल पता जिसका इस्तेमाल इवेंट बनाने वाले व्यक्ति के हिसाब से नतीजों को फ़िल्टर करने के लिए किया जाता है |
search | String | नतीजों को फ़िल्टर करने के लिए इस्तेमाल की गई फ़ुल-टेक्स्ट सर्च क्वेरी |
status | Guest | नतीजों को फ़िल्टर करने के लिए इस्तेमाल किए गए स्टेटस की एक कैटगरी |
वापसी का टिकट
CalendarEvent[] — दी गई तारीख पर होने वाले और शर्तों से मेल खाने वाले इवेंट
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getId()
इस कुकी का इस्तेमाल कैलेंडर का आईडी पाने के लिए किया जाता है. किसी उपयोगकर्ता के डिफ़ॉल्ट कैलेंडर का आईडी, उसका ईमेल पता होता है.
// Opens the calendar by its ID. // To get the user's default calendar, use CalendarApp.getDefaultCalendar(). // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById('222larabrown@gmail.com'); // Gets the ID of the calendar and logs it to the console. const calendarId = calendar.getId(); console.log(calendarId);
वापसी का टिकट
String — कैलेंडर का आईडी.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getName()
कैलेंडर का नाम मिलता है.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById('222larabrown@gmail.com'); // Gets the name of the calendar and logs it to the console. // For the default calendar, you can use CalendarApp.getName() instead. const calendarName = calendar.getName(); console.log(calendarName);
वापसी का टिकट
String — इस कैलेंडर का नाम.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getTimeZone()
कैलेंडर का टाइम ज़ोन मिलता है.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById('222larabrown@gmail.com'); // Gets the time zone of the calendar and logs it to the console. // For the default calendar, you can use CalendarApp.getTimeZone() instead. const timeZone = calendar.getTimeZone(); console.log(timeZone);
वापसी का टिकट
String — समय क्षेत्र, जिसे "long" फ़ॉर्मैट में तय किया गया है. उदाहरण के लिए, Joda.org की सूची के मुताबिक, "America/New_York".
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
isHidden()
इस कुकी से यह तय होता है कि कैलेंडर को यूज़र इंटरफ़ेस में छिपाया गया है या नहीं.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById('222larabrown@gmail.com'); // Determines whether the calendar is hidden in the user interface and logs it // to the console. For the default calendar, you can use CalendarApp.isHidden() // instead. const isHidden = calendar.isHidden(); console.log(isHidden);
वापसी का टिकट
Boolean — true अगर कैलेंडर को यूज़र इंटरफ़ेस में छिपाया गया है; false अगर ऐसा नहीं है.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
isMyPrimaryCalendar()
इस कुकी से यह पता चलता है कि कैलेंडर, उपयोगकर्ता का मुख्य कैलेंडर है या नहीं.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById('222larabrown@gmail.com'); // Determines whether the calendar is the default calendar for // the effective user and logs it to the console. // For the default calendar, you can use CalendarApp.isMyPrimaryCalendar() // instead. const isMyPrimaryCalendar = calendar.isMyPrimaryCalendar(); console.log(isMyPrimaryCalendar);
वापसी का टिकट
Boolean — true अगर कैलेंडर, उपयोगकर्ता के लिए डिफ़ॉल्ट कैलेंडर है; false अगर ऐसा नहीं है.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
isOwnedByMe()
यह कुकी यह तय करती है कि कैलेंडर का मालिकाना हक आपके पास है या नहीं.
// Gets a calendar by its ID. To get the user's default calendar, use // CalendarApp.getDefault() instead. // TODO(developer): Replace the ID with the calendar ID that you want to use. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Determines whether the calendar is owned by you and logs it. console.log(calendar.isOwnedByMe());
वापसी का टिकट
Boolean — true अगर कैलेंडर का मालिकाना हक आपके पास है; false अगर नहीं है.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
isSelected()
इस कुकी से यह तय होता है कि कैलेंडर के इवेंट, यूज़र इंटरफ़ेस में दिखेंगे या नहीं.
// Gets the user's default calendar. To get a different calendar, // use getCalendarById() instead. const calendar = CalendarApp.getDefaultCalendar(); // Determines whether the calendar's events are displayed in the user interface // and logs it. console.log(calendar.isSelected());
वापसी का टिकट
Boolean — true अगर कैलेंडर के इवेंट, यूज़र इंटरफ़ेस में दिखते हैं; false अगर नहीं दिखते हैं
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
setColor(color)
इससे कैलेंडर का रंग सेट किया जाता है.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById('222larabrown@gmail.com'); // Sets the color of the calendar to pink using the Calendar Color enum. // For the default calendar, you can use CalendarApp.setColor() instead. calendar.setColor(CalendarApp.Color.PINK);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
color | String | Calendar या हेक्साडेसिमल कलर स्ट्रिंग ("#rrggbb"). |
वापसी का टिकट
Calendar — यह कैलेंडर, चेन बनाने के लिए है.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setDescription(description)
इस कुकी का इस्तेमाल, किसी कैलेंडर की जानकारी सेट करने के लिए किया जाता है.
// Gets the user's default calendar. To get a different calendar, // use getCalendarById() instead. const calendar = CalendarApp.getDefaultCalendar(); // Sets the description of the calendar. // TODO(developer): Update the string with the description that you want to use. calendar.setDescription('Updated calendar description.');
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
description | String | इस कैलेंडर की जानकारी |
वापसी का टिकट
Calendar — यह कैलेंडर, चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setHidden(hidden)
इस कुकी से यह तय होता है कि कैलेंडर, यूज़र इंटरफ़ेस में दिखेगा या नहीं.
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
hidden | Boolean | यूज़र इंटरफ़ेस में कैलेंडर को छिपाने के लिए true; इसे दिखाने के लिए false |
वापसी का टिकट
Calendar — यह कैलेंडर, चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setName(name)
यह कुकी, कैलेंडर का नाम सेट करती है.
// Gets the user's default calendar. To get a different calendar, // use getCalendarById() instead. const calendar = CalendarApp.getDefaultCalendar(); // Sets the name of the calendar. // TODO(developer): Update the string with the name that you want to use. calendar.setName('Example calendar name');
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
name | String | नया नाम |
वापसी का टिकट
Calendar — यह कैलेंडर, चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setSelected(selected)
इस सेटिंग से यह तय होता है कि कैलेंडर के इवेंट, यूज़र इंटरफ़ेस में दिखेंगे या नहीं.
// Gets the user's default calendar. To get a different calendar, // use getCalendarById() instead. const calendar = CalendarApp.getDefaultCalendar(); // Selects the calendar so that its events are displayed in the user interface. // To unselect the calendar, set the parameter to false. calendar.setSelected(true);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
selected | Boolean | true यूज़र इंटरफ़ेस में कैलेंडर के इवेंट दिखाने के लिए; false
उन्हें छिपाने के लिए |
वापसी का टिकट
Calendar — यह कैलेंडर, चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setTimeZone(timeZone)
कैलेंडर का टाइम ज़ोन सेट करता है.
// Gets the user's default calendar. To get a different calendar, // use getCalendarById() instead. const calendar = CalendarApp.getDefaultCalendar(); // Sets the time zone of the calendar to America/New York (US/Eastern) time. calendar.setTimeZone('America/New_York');
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
time | String | समय क्षेत्र, जिसे "long" फ़ॉर्मैट में बताया गया है. जैसे, Joda.org में दिए गए "America/New_York". |
वापसी का टिकट
Calendar — यह कैलेंडर, चेन बनाने के लिए है.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
unsubscribeFromCalendar()
इस फ़ंक्शन का इस्तेमाल करके, उपयोगकर्ता को किसी कैलेंडर की सदस्यता से हटाया जा सकता है. कोई उपयोगकर्ता, मेरे कैलेंडर सूची में शामिल कैलेंडर की सदस्यता नहीं छोड़ सकता. वे अन्य कैलेंडर में मौजूद कैलेंडर की सदस्यता छोड़ सकते हैं.
// Gets the calendar by its ID. // TODO(developer): Replace the calendar ID with the calendar ID that you want // to get. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Unsubscribes the user from the calendar. const result = calendar.unsubscribeFromCalendar();
थ्रॉ
Error — अगर यह आपका कैलेंडर है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds