यह एक कैलेंडर इवेंट को दिखाता है.
तरीके
| तरीका | रिटर्न टाइप | संक्षिप्त विवरण |
|---|---|---|
add | Calendar | इस इवेंट के लिए, ईमेल से भेजे जाने वाले नए रिमाइंडर को जोड़ता है. |
add | Calendar | इस कुकी का इस्तेमाल, इवेंट में किसी मेहमान को जोड़ने के लिए किया जाता है. |
add | Calendar | यह इवेंट में नई पॉप-अप सूचना जोड़ता है. |
add | Calendar | इससे इवेंट के लिए एक नया एसएमएस रिमाइंडर जोड़ा जाता है. |
anyone | Boolean | इस कुकी से यह तय होता है कि लोग खुद को Calendar इवेंट में मेहमान के तौर पर जोड़ सकते हैं या नहीं. |
delete | void | यह Calendar इवेंट को मिटाता है. |
delete | Calendar | यह इवेंट से की/वैल्यू टैग मिटाता है. |
get | Date | इससे पूरे दिन चलने वाले इस कैलेंडर इवेंट के खत्म होने की तारीख मिलती है. |
get | Date | इस पूरे दिन के कैलेंडर इवेंट के शुरू होने की तारीख मिलती है. |
get | String[] | इस फ़ंक्शन से, इवेंट पर सेट किए गए टैग की सभी कुंजियां मिलती हैं. |
get | String | यह फ़ंक्शन, कैलेंडर इवेंट का रंग दिखाता है. |
get | String[] | किसी इवेंट के क्रिएटर्स की जानकारी मिलती है. |
get | Date | इस तरीके से, इवेंट बनाए जाने की तारीख मिलती है. |
get | String | इवेंट की जानकारी मिलती है. |
get | Integer[] | इस कुकी का इस्तेमाल, इवेंट के लिए सेट किए गए सभी ईमेल रिमाइंडर के लिए मिनट की वैल्यू पाने के लिए किया जाता है. |
get | Date | इस कैलेंडर इवेंट के खत्म होने की तारीख और समय की जानकारी मिलती है. |
get | Calendar | इस इवेंट से जुड़ी बार-बार होने वाली इवेंट की सीरीज़ मिलती है. |
get | Event | इस इवेंट का Event मिलता है. |
get | Event | ईमेल पते के हिसाब से मेहमान की जानकारी मिलती है. |
get | Event | यह इवेंट के मेहमानों की जानकारी देता है. इसमें इवेंट के मालिक की जानकारी शामिल नहीं होती. |
get | Event | इस तरीके से, इवेंट में शामिल मेहमानों की जानकारी मिलती है. इसमें इवेंट के मालिक भी शामिल हो सकते हैं. |
get | String | इससे इवेंट का यूनीक iCalUID मिलता है. |
get | Date | इस तरीके से, इवेंट को आखिरी बार अपडेट किए जाने की तारीख मिलती है. |
get | String | इवेंट की जगह की जानकारी मिलती है. |
get | Guest | इससे, ऐप्लिकेशन इस्तेमाल करने वाले व्यक्ति के इवेंट का स्टेटस (जैसे कि शामिल होना या न्योता पाना) मिलता है. |
get | String | उस कैलेंडर का आईडी पाएं जिस पर यह इवेंट बनाया गया था. |
get | Integer[] | इस कुकी का इस्तेमाल, इवेंट के लिए सेट किए गए सभी पॉप-अप रिमाइंडर के लिए मिनट की वैल्यू पाने के लिए किया जाता है. |
get | Integer[] | इस कुकी का इस्तेमाल, इवेंट के लिए एसएमएस से भेजे गए सभी रिमाइंडर के लिए मिनट की वैल्यू पाने के लिए किया जाता है. |
get | Date | इस कैलेंडर इवेंट के शुरू होने की तारीख और समय की जानकारी मिलती है. |
get | String | इस फ़ंक्शन से, इवेंट के टैग की वैल्यू मिलती है. |
get | String | इस तरीके से, इवेंट का टाइटल मिलता है. |
get | Event | इस इवेंट की पारदर्शिता की जानकारी मिलती है. |
get | Visibility | इस फ़ंक्शन से, इवेंट के दिखने की सेटिंग मिलती है. |
guests | Boolean | इससे यह तय होता है कि मेहमान, अन्य मेहमानों को न्योता भेज सकते हैं या नहीं. |
guests | Boolean | इससे यह तय होता है कि मेहमान इवेंट में बदलाव कर सकते हैं या नहीं. |
guests | Boolean | इस कुकी से यह तय होता है कि मेहमानों को अन्य मेहमान दिखेंगे या नहीं. |
is | Boolean | इससे पता चलता है कि यह पूरे दिन का इवेंट है या नहीं. |
is | Boolean | यह कुकी तय करती है कि आपके पास इवेंट का मालिकाना हक है या नहीं. |
is | Boolean | इस कुकी से यह पता चलता है कि इवेंट, इवेंट सीरीज़ का हिस्सा है या नहीं. |
remove | Calendar | इस विकल्प को चुनने पर, इवेंट से सभी रिमाइंडर हट जाते हैं. |
remove | Calendar | इस कुकी का इस्तेमाल, किसी मेहमान को इवेंट से हटाने के लिए किया जाता है. |
reset | Calendar | कैलेंडर की डिफ़ॉल्ट सेटिंग का इस्तेमाल करके, रिमाइंडर रीसेट करता है. |
set | Calendar | इस कुकी का इस्तेमाल, इवेंट की तारीख सेट करने के लिए किया जाता है. |
set | Calendar | इस कुकी का इस्तेमाल, इवेंट की तारीखें सेट करने के लिए किया जाता है. |
set | Calendar | इससे यह तय किया जाता है कि मेहमान नहीं बने लोग, इवेंट में खुद को जोड़ सकते हैं या नहीं. |
set | Calendar | इससे कैलेंडर इवेंट का रंग सेट किया जाता है. |
set | Calendar | इस कुकी का इस्तेमाल, इवेंट की जानकारी सेट करने के लिए किया जाता है. |
set | Calendar | इससे यह तय किया जाता है कि मेहमान अन्य मेहमानों को न्योता भेज सकते हैं या नहीं. |
set | Calendar | इससे यह तय किया जाता है कि मेहमान इवेंट में बदलाव कर सकते हैं या नहीं. |
set | Calendar | इस कुकी से यह तय होता है कि मेहमानों को अन्य मेहमान दिखेंगे या नहीं. |
set | Calendar | इससे इवेंट की जगह सेट की जाती है. |
set | Calendar | यह कुकी, ऐप्लिकेशन इस्तेमाल करने वाले व्यक्ति के इवेंट का स्टेटस सेट करती है. जैसे, इवेंट में शामिल होना या न्योता पाना. |
set | Calendar | यह इवेंट पर कुंजी/वैल्यू टैग सेट करता है, ताकि कस्टम मेटाडेटा को सेव किया जा सके. |
set | Calendar | इस कुकी का इस्तेमाल, इवेंट के शुरू और खत्म होने की तारीख और समय सेट करने के लिए किया जाता है. |
set | Calendar | इससे इवेंट का टाइटल सेट किया जाता है. |
set | Calendar | इससे इवेंट की पारदर्शिता सेट की जाती है. |
set | Calendar | इससे इवेंट के दिखने की सेटिंग सेट की जाती है. |
ज़्यादा जानकारी वाला दस्तावेज़
addEmailReminder(minutesBefore)
इस इवेंट के लिए, ईमेल से भेजे जाने वाले नए रिमाइंडर को जोड़ता है. रिमाइंडर, इवेंट से कम से कम 5 मिनट और ज़्यादा से ज़्यादा 4 हफ़्ते (40,320 मिनट) पहले सेट किया जाना चाहिए.
// Gets an event by its ID. For an event series, use getEventSeriesById(iCalId) // instead. // TODO(developer): Replace the string with the event ID that you want to get. const event = CalendarApp.getEventById('abc123456'); // Adds an email notification for 15 minutes before the event. event.addEmailReminder(15);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
minutes | Integer | इवेंट से पहले के मिनटों की संख्या |
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
थ्रॉ
Error — अगर इवेंट के लिए पांच से ज़्यादा रिमाइंडर सेट किए गए हैं या समय कानूनी सीमा में नहीं है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
addGuest(email)
इस कुकी का इस्तेमाल, इवेंट में किसी मेहमान को जोड़ने के लिए किया जाता है.
// Example 1: Add a guest to one event function addAttendeeToEvent() { // Replace the below values with your own const attendeeEmail = 'user@example.com'; // Email address of the person you need to add const calendarId = 'calendar_123@group.calendar.google.com'; // ID of calendar containing // event const eventId = '123abc'; // ID of event instance const calendar = CalendarApp.getCalendarById(calendarId); if (calendar === null) { // Calendar not found console.log('Calendar not found', calendarId); return; } const event = calendar.getEventById(eventId); if (event === null) { // Event not found console.log('Event not found', eventId); return; } event.addGuest(attendeeEmail); } // Example 2: Add a guest to all events on a calendar within a specified // timeframe function addAttendeeToAllEvents() { // Replace the following values with your own const attendeeEmail = 'user@example.com'; // Email address of the person you need to add const calendarId = 'calendar_123@group.calendar.google.com'; // ID of calendar with the // events const startDate = new Date('YYYY-MM-DD'); // The first date to add the guest to the events const endDate = new Date('YYYY-MM-DD'); // The last date to add the guest to the events const calendar = CalendarApp.getCalendarById(calendarId); if (calendar === null) { // Calendar not found console.log('Calendar not found', calendarId); return; } // Get the events within the specified timeframe const calEvents = calendar.getEvents(startDate, endDate); console.log(calEvents.length); // Checks how many events are found // Loop through all events and add the attendee to each of them for (let i = 0; i < calEvents.length; i++) { const event = calEvents[i]; event.addGuest(attendeeEmail); } }
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
email | String | मेहमान का ईमेल पता. |
वापसी का टिकट
CalendarEvent — This CalendarEvent for chaining.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
addPopupReminder(minutesBefore)
यह इवेंट में नई पॉप-अप सूचना जोड़ता है. सूचना, इवेंट से कम से कम 5 मिनट और ज़्यादा से ज़्यादा 4 हफ़्ते (40,320 मिनट) पहले दी जानी चाहिए.
// Gets an event by its ID. For an event series, use getEventSeriesById(iCalId) // instead. // TODO(developer): Replace the string with the event ID that you want to get. const event = CalendarApp.getEventById('abc123456'); // Adds a pop-up notification for 15 minutes before the event. event.addPopupReminder(15);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
minutes | Integer | इवेंट से पहले के मिनटों की संख्या |
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
addSmsReminder(minutesBefore)
इससे इवेंट के लिए एक नया एसएमएस रिमाइंडर जोड़ा जाता है. रिमाइंडर, इवेंट से कम से कम 5 मिनट और ज़्यादा से ज़्यादा 4 हफ़्ते (40,320 मिनट) पहले सेट किया जाना चाहिए.
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
minutes | Integer | इवेंट से पहले के मिनटों की संख्या |
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
थ्रॉ
Error — अगर इवेंट के लिए पांच से ज़्यादा रिमाइंडर सेट किए गए हैं या समय कानूनी सीमा में नहीं है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
anyoneCanAddSelf()
इस कुकी से यह तय होता है कि लोग खुद को Calendar इवेंट में मेहमान के तौर पर जोड़ सकते हैं या नहीं.
// Gets an event by its ID. For an event series, use getEventSeriesById(iCalId) // instead. // TODO(developer): Replace the string with the event ID that you want to get. const event = CalendarApp.getEventById('abc123456'); // Determines whether people can add themselves as guests to the event and logs // it. console.log(event.anyoneCanAddSelf());
वापसी का टिकट
Boolean — true अगर मेहमान नहीं बने लोग, इवेंट में खुद को जोड़ सकते हैं; false अगर नहीं
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
deleteEvent()
यह Calendar इवेंट को मिटाता है.
// Gets an event by its ID. // TODO(developer): Replace the string with the ID of the event that you want to // delete. const event = CalendarApp.getEventById('abc123456'); // Deletes the event. event.deleteEvent();
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
deleteTag(key)
यह इवेंट से की/वैल्यू टैग मिटाता है.
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
key | String | टैग की कुंजी |
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
getAllDayEndDate()
इससे पूरे दिन चलने वाले इस कैलेंडर इवेंट के खत्म होने की तारीख मिलती है. (अगर यह पूरे दिन का इवेंट नहीं है, तो यह तरीका एक अपवाद दिखाता है.) जवाब में मिला Date, इवेंट खत्म होने के बाद स्क्रिप्ट के टाइम ज़ोन के हिसाब से अगले दिन की आधी रात को दिखाता है. इसके बजाय, कैलेंडर के समय क्षेत्र का इस्तेमाल करने के लिए, getEndTime() को कॉल करें.
// Gets the user's default calendar. To get a different calendar, // use getCalendarById() instead. const calendar = CalendarApp.getDefaultCalendar(); // Creates an event named 'My all-day event' for May 16, 2023. const event = calendar.createAllDayEvent( 'My all-day event', new Date('May 16, 2023'), ); // Gets the event's end date and logs it. const endDate = event.getAllDayEndDate(); console.log(endDate);
वापसी का टिकट
Date — यह पूरे दिन चलने वाले कैलेंडर इवेंट के खत्म होने की तारीख है
थ्रॉ
Error — अगर यह इवेंट पूरे दिन का इवेंट नहीं है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getAllDayStartDate()
इस पूरे दिन के कैलेंडर इवेंट के शुरू होने की तारीख मिलती है. (अगर यह पूरे दिन का इवेंट नहीं है, तो यह तरीका एक अपवाद दिखाता है.) जवाब में मिला Date, उस दिन की आधी रात को दिखाता है जिस दिन इवेंट शुरू होता है. यह समय, स्क्रिप्ट के टाइम ज़ोन के हिसाब से होता है. इसके बजाय, कैलेंडर के समय क्षेत्र का इस्तेमाल करने के लिए, getStartTime() को कॉल करें.
// Gets the user's default calendar. To get a different calendar, // use getCalendarById() instead. const calendar = CalendarApp.getDefaultCalendar(); // Creates an event named 'My all-day event' for May 16, 2023. const event = calendar.createAllDayEvent( 'My all-day event', new Date('May 16, 2023'), ); // Gets the event's start date and logs it. const startDate = event.getAllDayStartDate(); console.log(startDate);
वापसी का टिकट
Date — यह पूरे दिन चलने वाले कैलेंडर इवेंट के शुरू होने की तारीख है
थ्रॉ
Error — अगर यह इवेंट पूरे दिन का इवेंट नहीं है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getAllTagKeys()
इस फ़ंक्शन से, इवेंट पर सेट किए गए टैग की सभी कुंजियां मिलती हैं.
वापसी का टिकट
String[] — स्ट्रिंग कुंजियों का कलेक्शन
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getColor()
यह फ़ंक्शन, कैलेंडर इवेंट का रंग दिखाता है.
// Gets an event by its ID. For an event series, use getEventSeriesById(iCalId) // instead. // TODO(developer): Replace the string with the event ID that you want to get. const event = CalendarApp.getEventById('abc123456'); // Gets the color of the calendar event and logs it. const eventColor = event.getColor(); console.log(eventColor);
वापसी का टिकट
String — यह इवेंट के रंग का स्ट्रिंग फ़ॉर्मैट है. यह CalendarApp.EventColor में मौजूद वैल्यू के इंडेक्स (1 से 11) के तौर पर होता है.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getCreators()
किसी इवेंट के क्रिएटर्स की जानकारी मिलती है.
// Gets an event by its ID. For an event series, use getEventSeriesById(iCalId) // instead. // TODO(developer): Replace the string with the event ID that you want to get. const event = CalendarApp.getEventById('abc123456'); // Gets a list of the creators of the event and logs it. console.log(event.getCreators());
वापसी का टिकट
String[] — इवेंट के क्रिएटर्स के ईमेल पते
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getDateCreated()
इस तरीके से, इवेंट बनाए जाने की तारीख मिलती है. आपके पास कैलेंडर का ऐक्सेस होना चाहिए.
// Opens the calendar by using its ID. // To get the user's default calendar use CalendarApp.getDefault() instead. // TODO(developer): Replace the calendar ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 8:10 AM and 4:25 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 01, 2023 08:10:00'), new Date('Feb 01, 2023 16:25:00'), )[0]; if (event) { // If an event exists within the given time frame, gets the date that the // event was created and logs it. const eventCreated = event.getDateCreated(); console.log(eventCreated); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
Date — इसे बनाने की तारीख
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते 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. // To get the user's default calendar use CalendarApp.getDefault() instead. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 4th, 2023 that takes // place between 4:00 PM and 5:00 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 04, 2023 16:00:00'), new Date('Feb 04, 2023 17:00:00'), )[0]; if (event) { // If an event exists within the given time frame, sets the description of the // event. event.setDescription('Important meeting'); // Gets the description of the event and logs it. const description = event.getDescription(); console.log(description); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
String — ब्यौरा
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getEmailReminders()
इस कुकी का इस्तेमाल, इवेंट के लिए सेट किए गए सभी ईमेल रिमाइंडर के लिए मिनट की वैल्यू पाने के लिए किया जाता है. आपके पास कैलेंडर में बदलाव करने का ऐक्सेस होना चाहिए.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 4th, 2023 that takes // place between 5:00 PM and 6:00 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 04, 2023 15:00:00'), new Date('Feb 04, 2023 18:00:00'), )[0]; if (event) { // If an event exists within the given time frame, adds email reminders for // the user to be sent at 4 and 7 minutes before the event. event.addEmailReminder(4); event.addEmailReminder(7); // Gets the minute values for all email reminders that are set up for the user // for this event and logs it. const emailReminder = event.getEmailReminders(); console.log(emailReminder); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
Integer[] — एक ऐसा ऐरे जिसमें हर वैल्यू, इवेंट से पहले के उन मिनटों की संख्या से मेल खाती है जब रिमाइंडर ट्रिगर होता है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getEndTime()
इस कैलेंडर इवेंट के खत्म होने की तारीख और समय की जानकारी मिलती है. आपके पास कैलेंडर का ऐक्सेस होना चाहिए. पूरे दिन के इवेंट के अलावा अन्य इवेंट के लिए, यह वह समय होता है जब इवेंट खत्म होने के लिए तय किया गया था. पूरे दिन के इवेंट के लिए, सिर्फ़ खत्म होने की तारीख सेव की जाती है. इसमें तारीख और समय सेव नहीं किया जाता. इसलिए, इवेंट के खत्म होने के बाद, कैलेंडर के टाइम ज़ोन के हिसाब से, यह तारीख अगले दिन की आधी रात होती है. इससे सभी तरह के इवेंट के खत्म होने के समय की तुलना आसानी से की जा सकती है. हालांकि, इससे साल के मूल दिन में कोई बदलाव नहीं होता.
पूरे दिन के इवेंट के लिए, इस तरीके के बजाय getAllDayEndDate() को प्राथमिकता दी जानी चाहिए.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 4:00 PM and 5:00 PM. const event = calendar.getEvents( new Date('Feb 01, 2023 16:00:00'), new Date('Feb 01, 2023 17:00:00'), )[0]; if (event) { // If an event exists within the given time frame, gets the date and time at // which the event ends and logs it. console.log(event.getEndTime()); } else { // If no event exists within the given time frame, logs that info to the // console. console.log('No events exist for the specified range'); }
वापसी का टिकट
Date — इस कैलेंडर इवेंट के खत्म होने का समय
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getEventSeries()
इस इवेंट से जुड़ी बार-बार होने वाली इवेंट की सीरीज़ मिलती है. आपके पास कैलेंडर का ऐक्सेस होना चाहिए. अगर यह इवेंट किसी सीरीज़ का हिस्सा नहीं है, तब भी CalendarEventSeries ऑब्जेक्ट वापस कर दिया जाता है, ताकि बार-बार होने वाले इवेंट की नई सेटिंग जोड़ी जा सकें.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 18th, 2023 that takes // place between 1:00 PM and 2:00 PM. const event = calendar.getEvents( new Date('Feb 18, 2023 13:00:00'), new Date('Feb 18, 2023 14:00:00'), )[0]; if (event) { // If an event exists within the given time frame, gets the event series for // the event and sets the color to pale green. event.getEventSeries().setColor(CalendarApp.EventColor.PALE_GREEN); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
CalendarEventSeries — यह इवेंट जिस सीरीज़ का हिस्सा है या अगर यह इवेंट किसी सीरीज़ का हिस्सा नहीं है, तो नई इवेंट सीरीज़
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getEventType()
इस इवेंट का EventType मिलता है.
// Opens the default calendar and logs all out-of-office events for the current day. const calendar = CalendarApp.getDefaultCalendar(); const events = calendar.getEventsForDay(new Date()); console.log(events.filter(e => e.getEventType() === CalendarApp.EventType.OUT_OF_OFFICE));
वापसी का टिकट
EventType — इवेंट का टाइप.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getGuestByEmail(email)
ईमेल पते के हिसाब से मेहमान की जानकारी मिलती है.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 25th, 2023 that takes // place between 5:00 PM and 5:25 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 25,2023 17:00:00'), new Date('Feb 25,2023 17:25:00'), )[0]; // Gets a guest by email address. const guestEmailId = event.getGuestByEmail('alex@example.com'); // If the email address corresponds to an event guest, logs the email address. if (guestEmailId) { console.log(guestEmailId.getEmail()); }
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
email | String | मेहमान का पता |
वापसी का टिकट
EventGuest — मेहमान या अगर ईमेल पता किसी मेहमान से मेल नहीं खाता है, तो null
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
getGuestList()
यह इवेंट के मेहमानों की जानकारी देता है. इसमें इवेंट के मालिक की जानकारी शामिल नहीं होती.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 25th, 2023 that takes // place between 5:00 PM and 5:25 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 25,2023 17:00:00'), new Date('Feb 25,2023 17:25:00'), )[0]; // Adds two guests to the event by using their email addresses. event.addGuest('alex@example.com'); event.addGuest('cruz@example.com'); // Gets the guests list for the event. const guestList = event.getGuestList(); // Loops through the list to get all the guests and logs their email addresses. for (const guest of guestList) { console.log(guest.getEmail()); }
वापसी का टिकट
EventGuest[] — मेहमानों की एक कैटगरी
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getGuestList(includeOwner)
इस तरीके से, इवेंट में शामिल मेहमानों की जानकारी मिलती है. इसमें इवेंट के मालिक भी शामिल हो सकते हैं.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 25th, 2023 that takes // place between 5:00 PM and 5:25 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 25,2023 17:00:00'), new Date('Feb 25,2023 17:25:00'), )[0]; // Gets the guests list for the event, including the owner of the event. const guestList = event.getGuestList(true); // Loops through the list to get all the guests and logs it. for (const guest of guestList) { console.log(guest.getEmail()); }
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
include | Boolean | मालिकों को मेहमान के तौर पर शामिल करना है या नहीं |
वापसी का टिकट
EventGuest[] — मेहमानों की एक कैटगरी
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getId()
इससे इवेंट का यूनीक iCalUID मिलता है. ध्यान दें कि Calendar v3 API और Calendar की ऐडवांस सेवा के ज़रिए इस्तेमाल किया गया iCalUID और इवेंट id एक जैसे नहीं होते. साथ ही, इनका इस्तेमाल एक-दूसरे की जगह नहीं किया जा सकता. इनके सिमैंटिक में एक अंतर यह है कि बार-बार होने वाले इवेंट में, एक इवेंट के सभी इंस्टेंस के लिए अलग-अलग ids होते हैं. हालांकि, उन सभी के लिए iCalUID एक ही होता है.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for January 5th, 2023 that takes place // between 9:00 AM and 9:25 AM. // For an event series, use calendar.getEventSeriesById('abc123456@google.com'); // and replace the series ID with your own. const event = calendar.getEvents( new Date('Jan 05, 2023 09:00:00'), new Date('Jan 05, 2023 09:25:00'), )[0]; // Gets the ID of the event and logs it. console.log(event.getId());
वापसी का टिकट
String — इवेंट का iCalUID
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getLastUpdated()
इस तरीके से, इवेंट को आखिरी बार अपडेट किए जाने की तारीख मिलती है.
// Opens the calendar by its ID. You must have view access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 4:00 PM and 5:00 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 01, 2023 16:00:00'), new Date('Feb 01, 2023 17:00:00'), )[0]; // Gets the date the event was last updated and logs it. const eventUpdatedDate = event.getLastUpdated(); console.log(eventUpdatedDate);
वापसी का टिकट
Date — पिछली बार अपडेट करने की तारीख
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getLocation()
इवेंट की जगह की जानकारी मिलती है.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 4:10 PM and 4:25 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 01, 2023 16:10:00'), new Date('Feb 01, 2023 16:25:00'), )[0]; if (event) { // If an event exists within the given time frame, sets the location of the // event to Mumbai. event.setLocation('Mumbai'); // Gets the location of the event and logs it. const eventLocation = event.getLocation(); console.log(eventLocation); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
String — इवेंट की जगह
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getMyStatus()
इससे, ऐप्लिकेशन इस्तेमाल करने वाले व्यक्ति के इवेंट का स्टेटस (जैसे कि शामिल होना या न्योता पाना) मिलता है. अगर इवेंट का मालिक ही उपयोगकर्ता है, तो हमेशा GuestStatus.OWNER दिखाता है.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 4:10 PM and 4:25 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 01, 2023 16:10:00'), new Date('Feb 01, 2023 16:25:00'), )[0]; if (event) { // If an event exists within the given time frame, gets the event status of // the effective user and logs it. const myStatus = event.getMyStatus(); console.log(myStatus.toString()); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
GuestStatus — स्टेटस
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getOriginalCalendarId()
उस कैलेंडर का आईडी पाएं जिस पर यह इवेंट बनाया गया था.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 25th, 2023 that takes // place between 4:00 PM and 4:25 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 25,2023 16:00:00'), new Date('Feb 25,2023 16:25:00'), )[0]; if (event) { // If an event exists within the given time frame, gets the ID of the calendar // where the event was originally created and logs it. const calendarId = event.getOriginalCalendarId(); console.log(calendarId); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
String — ओरिजनल कैलेंडर का आईडी
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getPopupReminders()
इस कुकी का इस्तेमाल, इवेंट के लिए सेट किए गए सभी पॉप-अप रिमाइंडर के लिए मिनट की वैल्यू पाने के लिए किया जाता है.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 4th, 2023 that takes // place between 5:05 PM and 5:35 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 04, 2023 17:05:00'), new Date('Feb 04, 2023 17:35:00'), )[0]; if (event) { // If an event exists within the given time frame, adds two pop-up reminders // to the event. The first reminder pops up 5 minutes before the event starts // and the second reminder pops up 3 minutes before the event starts. event.addPopupReminder(3); event.addPopupReminder(5); // Gets the minute values for all pop-up reminders for the event and logs it. const popUpReminder = event.getPopupReminders(); console.log(popUpReminder); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
Integer[] — एक ऐसा ऐरे जिसमें हर वैल्यू, इवेंट से पहले के उन मिनटों की संख्या से मेल खाती है जब रिमाइंडर ट्रिगर होता है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getSmsReminders()
इस कुकी का इस्तेमाल, इवेंट के लिए एसएमएस से भेजे गए सभी रिमाइंडर के लिए मिनट की वैल्यू पाने के लिए किया जाता है.
वापसी का टिकट
Integer[] — एक ऐसा ऐरे जिसमें हर वैल्यू, इवेंट से पहले के उन मिनटों की संख्या से मेल खाती है जब रिमाइंडर ट्रिगर होता है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getStartTime()
इस कैलेंडर इवेंट के शुरू होने की तारीख और समय की जानकारी मिलती है. पूरे दिन न चलने वाले इवेंट के लिए, यह वह समय होता है जब इवेंट शुरू होने के लिए तय किया गया था. पूरे दिन के इवेंट के लिए, सिर्फ़ शुरू होने की तारीख सेव की जाती है. तारीख और समय सेव नहीं किया जाता. इसलिए, यह कैलेंडर के टाइम ज़ोन के हिसाब से, इवेंट शुरू होने वाले दिन की आधी रात होती है. इससे सभी तरह के इवेंट के शुरू होने के समय की तुलना आसानी से की जा सकती है. हालांकि, यह ज़रूरी नहीं है कि साल के दिन के हिसाब से इवेंट के शुरू होने के समय में कोई बदलाव न हो.
पूरे दिन के इवेंट के लिए, इस तरीके के बजाय getAllDayStartDate() को प्राथमिकता दी जानी चाहिए.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 4:10 PM and 4:25 PM. const event = calendar.getEvents( new Date('Feb 01, 2023 16:10:00'), new Date('Feb 01, 2023 16:25:00'), )[0]; // Gets the date and time at which this calendar event begins and logs it. const startTime = event.getStartTime(); console.log(startTime);
वापसी का टिकट
Date — यह कैलेंडर इवेंट शुरू होने का समय है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getTag(key)
इस फ़ंक्शन से, इवेंट के टैग की वैल्यू मिलती है.
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
key | String | कुंजी |
वापसी का टिकट
String — टैग की वैल्यू
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getTitle()
इस तरीके से, इवेंट का टाइटल मिलता है.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for January 31st, 2023 that takes // place between 9:05 AM and 9:15 AM. For an event series, use // calendar.getEventSeriesById('abc123456@example.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Jan 31, 2023 09:05:00'), new Date('Jan 31, 2023 09:15:00'), )[0]; if (event) { // If an event exists within the given time frame, logs the title of the // event. console.log(event.getTitle()); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
String — टाइटल
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getTransparency()
इस इवेंट की पारदर्शिता की जानकारी मिलती है. इस तरीके का इस्तेमाल करके यह पता लगाया जा सकता है कि कोई इवेंट
TRANSPARENT है या OPAQUE
. इसका मतलब है कि कैलेंडर में उस समय के लिए, 'उपलब्ध है' या 'व्यस्त है' के तौर पर दिखाया गया है.
// Gets the first event from the default calendar for today. const today = new Date(); const event = CalendarApp.getDefaultCalendar().getEventsForDay(today)[0]; // Gets the event's transparency and logs it. const transparency = event.getTransparency(); Logger.log(transparency);
वापसी का टिकट
EventTransparency — पारदर्शिता की वैल्यू.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
getVisibility()
इस फ़ंक्शन से, इवेंट के दिखने की सेटिंग मिलती है.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 4:10 PM and 4:25 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 01, 2023 16:10:00'), new Date('Feb 01, 2023 16:25:00'), )[0]; if (event) { // If an event exists within the given time frame, gets the visibility of the // event and logs it. const eventVisibility = event.getVisibility(); console.log(eventVisibility.toString()); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
Visibility — विज़िबिलिटी की वैल्यू
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
guestsCanInviteOthers()
इससे यह तय होता है कि मेहमान, अन्य मेहमानों को न्योता भेज सकते हैं या नहीं.
// Opens the calendar by its ID. You must have view access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 9:35 AM and 9:40 AM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 01, 2023 09:35:00'), new Date('Feb 01, 2023 09:40:00'), )[0]; if (event) { // If an event exists within the given time frame, determines whether guests // can invite other guests and logs it. console.log(event.guestsCanInviteOthers()); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
Boolean — true अगर मेहमानों को अन्य लोगों को न्योता भेजने की अनुमति है; false अगर नहीं है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
guestsCanModify()
इससे यह तय होता है कि मेहमान इवेंट में बदलाव कर सकते हैं या नहीं.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 9:35 AM and 9:40 AM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 01, 2023 09:35:00'), new Date('Feb 01, 2023 09:40:00'), )[0]; if (event) { // If an event exists within the given time frame, sets the event so that // guests can't modify it. event.setGuestsCanModify(false); // Determines whether guests can modify the event and logs it. console.log(event.guestsCanModify()); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
Boolean — true अगर मेहमान इवेंट में बदलाव कर सकते हैं; false अगर नहीं
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
guestsCanSeeGuests()
इस कुकी से यह तय होता है कि मेहमानों को अन्य मेहमान दिखेंगे या नहीं.
// Opens the calendar by its ID. You must have view access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 9:35 AM and 9:40 AM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 01, 2023 09:35:00'), new Date('Feb 01, 2023 09:40:00'), )[0]; if (event) { // If an event exists within the given time frame, determines whether guests // can see other guests and logs it. console.log(event.guestsCanSeeGuests()); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
Boolean — true अगर मेहमान अन्य मेहमानों को देख सकते हैं; false अगर नहीं
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
isAllDayEvent()
इससे पता चलता है कि यह पूरे दिन का इवेंट है या नहीं.
// Opens the calendar by its ID. You must have view access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for January 31st, 2023 that takes // place between 9:05 AM and 9:15 AM. const event = calendar.getEvents( new Date('Jan 31, 2023 09:05:00'), new Date('Jan 31, 2023 09:15:00'), )[0]; // Determines whether this event is an all-day event and logs it. console.log(event.isAllDayEvent());
वापसी का टिकट
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()
यह कुकी तय करती है कि आपके पास इवेंट का मालिकाना हक है या नहीं.
// Opens the calendar by its ID. You must have view access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for January 31st, 2023 that takes // place between 9:05 AM and 9:15 AM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Jan 31, 2023 09:05:00'), new Date('Jan 31, 2023 09:15:00'), )[0]; if (event) { // If an event exists within the given time frame, determines whether you're // the owner of the event and logs it. console.log(event.isOwnedByMe()); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
Boolean — अगर इवेंट का मालिकाना हक असरदार यूज़र आईडी के पास है, तो true; अगर नहीं है, तो false
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
isRecurringEvent()
इस कुकी से यह पता चलता है कि इवेंट, इवेंट सीरीज़ का हिस्सा है या नहीं.
// Opens the calendar by its ID. You must have view access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for Januart 31st, 2023 that takes // place between 9:00 AM and 10:00 AM. const event = calendar.getEvents( new Date('Jan 31, 2023 09:00:00'), new Date('Jan 31, 2023 10:00:00'), )[0]; if (event) { // If an event exists within the given time frame, determines whether the // event is part of an event series and logs it. console.log(event.isRecurringEvent()); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
Boolean — अगर इवेंट, इवेंट सीरीज़ का हिस्सा है, तो true; अगर नहीं है, तो false
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
removeAllReminders()
इस विकल्प को चुनने पर, इवेंट से सभी रिमाइंडर हट जाते हैं.
// Opens the calendar by its ID. You must have edit access to the calendar // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 4:10 PM and 4:25 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 1,2023 16:10:00'), new Date('Feb 1,2023 16:25:00'), )[0]; if (event) { // If an event exists within the given time frame, removes all reminders from // the event. event.removeAllReminders(); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
removeGuest(email)
इस कुकी का इस्तेमाल, किसी मेहमान को इवेंट से हटाने के लिए किया जाता है.
// Example 1: Remove a guest from one event function removeGuestFromEvent() { // Replace the below values with your own const attendeeEmail = 'user@example.com'; // Email address of the person you need to remove const calendarId = 'calendar_123@group.calendar.google.com'; // ID of calendar containing // event const eventId = '123abc'; // ID of event instance const calendar = CalendarApp.getCalendarById(calendarId); if (calendar === null) { // Calendar not found console.log('Calendar not found', calendarId); return; } const event = calendar.getEventById(eventId); if (event === null) { // Event not found console.log('Event not found', eventId); return; } event.removeGuest(attendeeEmail); } // Example 2: Remove a guest from all events on a calendar within a specified // timeframe function removeGuestFromAllEvents() { // Replace the following values with your own const attendeeEmail = 'user@example.com'; // Email address of the person you need to remove const calendarId = 'calendar_123@group.calendar.google.com'; // ID of calendar with the // events const startDate = new Date( 'YYYY-MM-DD'); // The first date to remove the guest from the events const endDate = new Date( 'YYYY-MM-DD'); // The last date to remove the attendee from the events const calendar = CalendarApp.getCalendarById(calendarId); if (calendar === null) { // Calendar not found console.log('Calendar not found', calendarId); return; } // Get the events within the specified timeframe const calEvents = calendar.getEvents(startDate, endDate); console.log(calEvents.length); // Checks how many events are found // Loop through all events and remove the attendee from each of them for (let i = 0; i < calEvents.length; i++) { const event = calEvents[i]; event.removeGuest(attendeeEmail); } }
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
email | String | मेहमान का ईमेल पता |
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
resetRemindersToDefault()
कैलेंडर की डिफ़ॉल्ट सेटिंग का इस्तेमाल करके, रिमाइंडर रीसेट करता है.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 4:10 PM and 4:25 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 1, 2023 16:10:00'), new Date('Feb 1, 2023 16:25:00'), )[0]; if (event) { // If an event exists within the given time frame, resets the reminders using // the calendar's default settings. event.resetRemindersToDefault(); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setAllDayDate(date)
इस कुकी का इस्तेमाल, इवेंट की तारीख सेट करने के लिए किया जाता है. इस तरीके का इस्तेमाल करने पर, एक बार होने वाला इवेंट, पूरे दिन के इवेंट में बदल जाता है.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 17th, 2023 that takes // place between 4:00 PM and 5:00 PM. const event = calendar.getEvents( new Date('Feb 17, 2023 16:00:00'), new Date('Feb 17, 2023 17:00:00'), )[0]; if (event) { // If an event exists within the given time frame, sets the date of the event // and updates it to an all-day event. event.setAllDayDate(new Date('Feb 17, 2023')); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
date | Date | इवेंट की तारीख (समय को अनदेखा किया जाता है) |
वापसी का टिकट
CalendarEvent — यह चेनिंग के लिए CalendarEvent है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setAllDayDates(startDate, endDate)
इस कुकी का इस्तेमाल, इवेंट की तारीखें सेट करने के लिए किया जाता है. इस तरीके का इस्तेमाल करने पर, सामान्य इवेंट को पूरे दिन के इवेंट में बदल दिया जाता है.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 18th, 2023 that takes // place between 4:00 PM and 5:00 PM. const event = calendar.getEvents( new Date('Feb 18, 2023 16:00:00'), new Date('Feb 18, 2023 17:00:00'), )[0]; if (event) { // If an event exists within the given time frame, sets the event to be an // all-day event from Feb 18th, 2023 until Feb 25th, 2023. Applying this // method changes a regular event into an all-day event. event.setAllDayDates(new Date('Feb 18, 2023'), new Date('Feb 25, 2023')); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
start | Date | इवेंट के शुरू होने की तारीख (समय को अनदेखा किया जाता है) |
end | Date | इवेंट के खत्म होने की तारीख (समय को अनदेखा किया जाता है) |
वापसी का टिकट
CalendarEvent — यह चेनिंग के लिए CalendarEvent है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setAnyoneCanAddSelf(anyoneCanAddSelf)
इससे यह तय किया जाता है कि मेहमान नहीं बने लोग, इवेंट में खुद को जोड़ सकते हैं या नहीं.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 15th, 2023 that takes // place between 3:30 PM and 4:30 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 15, 2023 15:30:00'), new Date('Feb 15, 2023 16:30:00'), )[0]; if (event) { // If an event exists within the given time frame, sets the event so that // non-guests can't add themselves to the event. event.setAnyoneCanAddSelf(false); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
anyone | Boolean | क्या कोई भी व्यक्ति खुद को न्योता भेज सकता है |
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setColor(color)
इससे कैलेंडर इवेंट का रंग सेट किया जाता है.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 4:10 PM and 4:25 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 01, 2023 16:10:00'), new Date('Feb 01, 2023 16:25:00'), )[0]; if (event) { // If an event exists within the given time frame, sets the color of the // calendar event to green. event.setColor(CalendarApp.EventColor.GREEN); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
color | String | स्ट्रिंग के तौर पर पूर्णांक रंग इंडेक्स या Calendar से कोई वैल्यू. |
वापसी का टिकट
CalendarEvent — यह कैलेंडर इवेंट, चेन बनाने के लिए है.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setDescription(description)
इस कुकी का इस्तेमाल, इवेंट की जानकारी सेट करने के लिए किया जाता है.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 4th, 2023 that takes // place between 5:05 PM and 5:35 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 04, 2023 17:05:00'), new Date('Feb 04, 2023 17:35:00'), )[0]; if (event) { // If an event exists within the given time frame, sets the description of the // event to 'Meeting.' event.setDescription('Meeting'); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
description | String | नई जानकारी |
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setGuestsCanInviteOthers(guestsCanInviteOthers)
इससे यह तय किया जाता है कि मेहमान अन्य मेहमानों को न्योता भेज सकते हैं या नहीं.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. You must have edit access to // the calendar. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 9:35 AM and 9:40 AM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 01, 2023 09:35:00'), new Date('Feb 01, 2023 09:40:00'), )[0]; if (event) { // If an event exists within the given time frame, sets the event so that // guests can invite other guests. event.setGuestsCanInviteOthers(true); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
guests | Boolean | मेहमानों को अन्य लोगों को न्योता भेजने की अनुमति है या नहीं |
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setGuestsCanModify(guestsCanModify)
इससे यह तय किया जाता है कि मेहमान इवेंट में बदलाव कर सकते हैं या नहीं.
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
guests | Boolean | मेहमानों को इवेंट में बदलाव करने की अनुमति है या नहीं |
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setGuestsCanSeeGuests(guestsCanSeeGuests)
इस कुकी से यह तय होता है कि मेहमानों को अन्य मेहमान दिखेंगे या नहीं.
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
guests | Boolean | मेहमानों को अन्य मेहमानों की जानकारी दिखेगी या नहीं |
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setLocation(location)
इससे इवेंट की जगह सेट की जाती है.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 4:10 PM and 4:25 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 01, 2023 16:10:00'), new Date('Feb 01, 2023 16:25:00'), )[0]; if (event) { // If an event exists within the given time frame, sets the location of the // event to Noida. event.setLocation('Noida'); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
location | String | नई जगह की जानकारी |
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setMyStatus(status)
यह कुकी, ऐप्लिकेशन इस्तेमाल करने वाले व्यक्ति के इवेंट का स्टेटस सेट करती है. जैसे, इवेंट में शामिल होना या न्योता पाना.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for February 1st, 2023 that takes // place between 4:10 PM and 4:25 PM. For an event series, use // calendar.getEventSeriesById('abc123456@google.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Feb 01, 2023 16:10:00'), new Date('Feb 01, 2023 16:25:00'), )[0]; if (event) { // If an event exists within the given time frame, sets the event status for // the current user to maybe. event.setMyStatus(CalendarApp.GuestStatus.MAYBE); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
status | Guest | नया स्टेटस |
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.googleapis.com/auth/calendar.readonly -
https://www.google.com/calendar/feeds
setTag(key, value)
यह इवेंट पर कुंजी/वैल्यू टैग सेट करता है, ताकि कस्टम मेटाडेटा को सेव किया जा सके.
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
key | String | टैग की कुंजी |
value | String | टैग की वैल्यू |
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setTime(startTime, endTime)
इस कुकी का इस्तेमाल, इवेंट के शुरू और खत्म होने की तारीख और समय सेट करने के लिए किया जाता है. इस तरीके का इस्तेमाल करने पर, पूरे दिन का इवेंट एक सामान्य इवेंट में बदल जाता है.
// Opens the calendar by its ID. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Declares a start time of 11:00 AM on February 20th, 2023 and an end time of // 12:00 PM on February 20th, 2023. const startTime = new Date('Feb 20,2023 11:00:00'); const endTime = new Date('Feb 20, 2023 12:00:00'); // Creates an all-day event on February 20th, 2023. const event = calendar.createAllDayEvent('Meeting', new Date('Feb 20,2023')); // Updates the all-day event to a regular event by setting a start and end time // for the event. event.setTime(startTime, endTime);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
start | Date | इवेंट के शुरू होने का नया समय |
end | Date | इवेंट के खत्म होने का नया समय |
वापसी का टिकट
CalendarEvent — यह चेनिंग के लिए CalendarEvent है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setTitle(title)
इससे इवेंट का टाइटल सेट किया जाता है.
// Opens the calendar by its ID. You must have edit access to the calendar. // TODO(developer): Replace the ID with your own. const calendar = CalendarApp.getCalendarById( 'abc123456@group.calendar.google.com', ); // Gets the first event from the calendar for January 31st, 2023 that takes // place between 9:05 AM and 9:15 AM. For an event series, use // calendar.getEventSeriesById('abc123456@example.com'); and replace the series // ID with your own. const event = calendar.getEvents( new Date('Jan 31, 2023 09:05:00'), new Date('Jan 31, 2023 09:15:00'), )[0]; if (event) { // If an event exists within the given time frame, changes its title to // Event1. event.setTitle('Event1'); } else { // If no event exists within the given time frame, logs that information to // the console. console.log('No events exist for the specified range'); }
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
title | String | नया टाइटल |
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setTransparency(transparency)
इससे इवेंट की पारदर्शिता सेट की जाती है. इस तरीके का इस्तेमाल करके, यह सेट करें कि कोई इवेंट
TRANSPARENT है या OPAQUE
.
TRANSPARENT का मतलब है कि कैलेंडर में उस समय के लिए 'उपलब्ध है' स्टेटस दिखेगा. वहीं, OPAQUE
का मतलब है कि कैलेंडर में उस समय के लिए 'व्यस्त है' स्टेटस दिखेगा.
// Gets an event by its ID. For an event series, use getEventSeriesById(iCalId) // instead. // TODO(developer): Replace the string with the event ID that you want to get. const event = CalendarApp.getEventById('abc123456'); // Sets the event's transparency to TRANSPARENT. event.setTransparency(CalendarApp.EventTransparency.TRANSPARENT);
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
transparency | Event | पारदर्शिता की वैल्यू. |
वापसी का टिकट
CalendarEvent — This CalendarEvent for chaining.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds
setVisibility(visibility)
इससे इवेंट के दिखने की सेटिंग सेट की जाती है.
पैरामीटर
| नाम | टाइप | ब्यौरा |
|---|---|---|
visibility | Visibility |
वापसी का टिकट
CalendarEvent — यह CalendarEvent चेनिंग के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट के लिए, यहां दिए गए एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API से सही स्कोप के साथ अनुमति लेना ज़रूरी है:
-
https://www.googleapis.com/auth/calendar -
https://www.google.com/calendar/feeds