इवेंट की सीरीज़ (बार-बार होने वाला इवेंट) के बारे में बताता है.
तरीके
तरीका | रिटर्न टाइप | संक्षिप्त विवरण |
---|---|---|
addEmailReminder(minutesBefore) | CalendarEventSeries | इवेंट में एक नया ईमेल रिमाइंडर जोड़ता है. |
addGuest(email) | CalendarEventSeries | इवेंट में मेहमान को जोड़ता है. |
addPopupReminder(minutesBefore) | CalendarEventSeries | इवेंट में एक नई पॉप-अप सूचना जोड़ता है. |
addSmsReminder(minutesBefore) | CalendarEventSeries | इवेंट में एक नया एसएमएस रिमाइंडर जोड़ता है. |
anyoneCanAddSelf() | Boolean | इससे यह तय होता है कि लोग कैलेंडर इवेंट में खुद को मेहमान के रूप में जोड़ सकते हैं या नहीं. |
deleteEventSeries() | void | इवेंट सीरीज़ को मिटाता है. |
deleteTag(key) | CalendarEventSeries | इवेंट से कुंजी/वैल्यू टैग मिटाता है. |
getAllTagKeys() | String[] | इवेंट पर सेट किए गए टैग की सभी कुंजियां मिलती हैं. |
getColor() | String | कैलेंडर इवेंट का रंग दिखाता है. |
getCreators() | String[] | किसी इवेंट के क्रिएटर की जानकारी मिलती है. |
getDateCreated() | Date | इवेंट बनाने की तारीख का पता चलता है. |
getDescription() | String | इवेंट की जानकारी मिलती है. |
getEmailReminders() | Integer[] | इवेंट के लिए सभी ईमेल रिमाइंडर के लिए मिनट की वैल्यू दिखाता है. |
getGuestByEmail(email) | EventGuest | ईमेल पते से मेहमान को कॉल करता है. |
getGuestList() | EventGuest[] | इवेंट के मेहमानों को शामिल करता है, जिसमें इवेंट का मालिक शामिल नहीं होता. |
getGuestList(includeOwner) | EventGuest[] | इवेंट के मेहमानों को शामिल करता है. इनमें इवेंट के मालिक भी शामिल हो सकते हैं. |
getId() | String | इवेंट का यूनीक iCalUID की जानकारी मिलती है. |
getLastUpdated() | Date | उस तारीख की जानकारी मिलती है जिस दिन इवेंट को आखिरी बार अपडेट किया गया था. |
getLocation() | String | इवेंट की जगह की जानकारी मिलती है. |
getMyStatus() | GuestStatus | असरदार उपयोगकर्ता के इवेंट की स्थिति की जानकारी मिलती है. जैसे, इवेंट में शामिल होना या उसे न्योता भेजना. |
getOriginalCalendarId() | String | उस कैलेंडर का आईडी पाएं जहां से यह इवेंट मूल रूप से बनाया गया था. |
getPopupReminders() | Integer[] | इवेंट के लिए सभी पॉप-अप रिमाइंडर के लिए मिनट की वैल्यू दिखाता है. |
getSmsReminders() | Integer[] | इवेंट के लिए सभी एसएमएस रिमाइंडर के लिए मिनट की वैल्यू दिखाता है. |
getTag(key) | String | इवेंट की टैग वैल्यू दिखाता है. |
getTitle() | String | इवेंट के शीर्षक की जानकारी मिलती है. |
getVisibility() | Visibility | इवेंट किसे दिखे, इस बारे में जानकारी मिलती है. |
guestsCanInviteOthers() | Boolean | इससे तय होता है कि मेहमान दूसरे मेहमानों को न्योता भेज सकते हैं या नहीं. |
guestsCanModify() | Boolean | इससे यह तय किया जाता है कि मेहमान इवेंट में बदलाव कर सकते हैं या नहीं. |
guestsCanSeeGuests() | Boolean | इससे तय होता है कि मेहमान अन्य मेहमानों को देख सकते हैं या नहीं. |
isOwnedByMe() | Boolean | इससे यह पता चलता है कि आप इवेंट के मालिक हैं या नहीं. |
removeAllReminders() | CalendarEventSeries | इवेंट के सभी रिमाइंडर हटा देता है. |
removeGuest(email) | CalendarEventSeries | इवेंट से मेहमान को हटाता है. |
resetRemindersToDefault() | CalendarEventSeries | कैलेंडर की डिफ़ॉल्ट सेटिंग का इस्तेमाल करके रिमाइंडर रीसेट करता है. |
setAnyoneCanAddSelf(anyoneCanAddSelf) | CalendarEventSeries | सेट करता है कि गैर-मेहमान खुद को इवेंट में जोड़ सकते हैं या नहीं. |
setColor(color) | CalendarEventSeries | कैलेंडर इवेंट का रंग सेट करता है. |
setDescription(description) | CalendarEventSeries | इवेंट की जानकारी सेट करता है. |
setGuestsCanInviteOthers(guestsCanInviteOthers) | CalendarEventSeries | सेट करता है कि मेहमान अन्य मेहमानों को न्योता भेज सकते हैं या नहीं. |
setGuestsCanModify(guestsCanModify) | CalendarEventSeries | सेट करता है कि मेहमान इवेंट में बदलाव कर सकते हैं या नहीं. |
setGuestsCanSeeGuests(guestsCanSeeGuests) | CalendarEventSeries | सेट करता है कि क्या मेहमान अन्य मेहमानों को देख सकते हैं. |
setLocation(location) | CalendarEventSeries | इवेंट की जगह सेट करता है. |
setMyStatus(status) | CalendarEventSeries | असरदार उपयोगकर्ता के इवेंट की स्थिति सेट करती है, जैसे कि इवेंट में शामिल होना या उसे न्योता भेजना. |
setRecurrence(recurrence, startDate) | CalendarEventSeries | पूरे दिन के इवेंट की सीरीज़ के लिए, बार-बार होने के नियम सेट करता है. |
setRecurrence(recurrence, startTime, endTime) | CalendarEventSeries | इस इवेंट सीरीज़ के लिए, बार-बार होने के नियम सेट करता है. |
setTag(key, value) | CalendarEventSeries | कस्टम मेटाडेटा को सेव करने के लिए, इवेंट पर कुंजी/वैल्यू टैग सेट करता है. |
setTitle(title) | CalendarEventSeries | इवेंट का शीर्षक सेट करता है. |
setVisibility(visibility) | CalendarEventSeries | इवेंट की दृश्यता सेट करता है. |
ज़्यादा जानकारी के साथ दस्तावेज़
addEmailReminder(minutesBefore)
इवेंट में एक नया ईमेल रिमाइंडर जोड़ता है. रिमाइंडर, इवेंट से कम से कम पांच मिनट पहले और ज़्यादा से ज़्यादा चार हफ़्ते (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);
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
minutesBefore | Integer | इवेंट शुरू होने के कुल मिनट |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
थ्रो
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 let attendeeEmail = 'user@example.com'; // Email address of the person you need to add let calendarId = 'calendar_123@group.calendar.google.com'; // ID of calendar containing event let eventId = '123abc'; // ID of event instance let calendar = CalendarApp.getCalendarById(calendarId); if (calendar === null) { // Calendar not found console.log('Calendar not found', calendarId); return; } let 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 let attendeeEmail = 'user@example.com'; // Email address of the person you need to add let calendarId = 'calendar_123@group.calendar.google.com'; // ID of calendar with the events let startDate = new Date("YYYY-MM-DD"); // The first date to add the guest to the events let endDate = new Date("YYYY-MM-DD"); // The last date to add the guest to the events let calendar = CalendarApp.getCalendarById(calendarId); if (calendar === null) { // Calendar not found console.log('Calendar not found', calendarId); return; } // Get the events within the specified timeframe let 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 (var i = 0; i < calEvents.length; i++) { let event = calEvents[i]; event.addGuest(attendeeEmail); } }
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
email | String | मेहमान का ईमेल पता. |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API के सही स्कोप की मदद से अनुमति देना ज़रूरी होता है:
-
https://www.googleapis.com/auth/calendar
-
https://www.google.com/calendar/feeds
addPopupReminder(minutesBefore)
इवेंट में एक नई पॉप-अप सूचना जोड़ता है. सूचना, इवेंट से कम से कम पांच मिनट पहले और ज़्यादा से ज़्यादा चार हफ़्ते (40320 मिनट) की होनी चाहिए.
// 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);
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
minutesBefore | Integer | इवेंट शुरू होने के कुल मिनट |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API के सही स्कोप की मदद से अनुमति देना ज़रूरी होता है:
-
https://www.googleapis.com/auth/calendar
-
https://www.google.com/calendar/feeds
addSmsReminder(minutesBefore)
इवेंट में एक नया एसएमएस रिमाइंडर जोड़ता है. रिमाइंडर, इवेंट से कम से कम पांच मिनट पहले और ज़्यादा से ज़्यादा चार हफ़्ते (40,320 मिनट) का होना चाहिए.
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
minutesBefore | Integer | इवेंट शुरू होने के कुल मिनट |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
थ्रो
Error
— अगर इवेंट के पांच से ज़्यादा रिमाइंडर हैं या समय, कानूनी सीमा के अंदर नहीं है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API के सही स्कोप की मदद से अनुमति देना ज़रूरी होता है:
-
https://www.googleapis.com/auth/calendar
-
https://www.google.com/calendar/feeds
anyoneCanAddSelf()
इससे यह तय होता है कि लोग कैलेंडर इवेंट में खुद को मेहमान के रूप में जोड़ सकते हैं या नहीं.
// 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
deleteEventSeries()
इवेंट सीरीज़ को मिटाता है.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API के सही स्कोप की मदद से अनुमति देना ज़रूरी होता है:
-
https://www.googleapis.com/auth/calendar
-
https://www.google.com/calendar/feeds
deleteTag(key)
इवेंट से कुंजी/वैल्यू टैग मिटाता है.
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
key | String | टैग कुंजी |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API के सही स्कोप की मदद से अनुमति देना ज़रूरी होता है:
-
https://www.googleapis.com/auth/calendar
-
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
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()); }
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
email | String | मेहमान का पता |
रिटर्न
EventGuest
— मेहमान या मेहमान का ईमेल पता अलग से होने पर, शून्य डालें
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते 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()); }
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
includeOwner | 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 और कैलेंडर की बेहतर सेवा के लिए इस्तेमाल किया जाने वाला 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
getTag(key)
इवेंट की टैग वैल्यू दिखाता है.
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
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@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, 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
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
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
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'); }
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते 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 let attendeeEmail = 'user@example.com'; // Email address of the person you need to remove let calendarId = 'calendar_123@group.calendar.google.com'; // ID of calendar containing event let eventId = '123abc'; // ID of event instance let calendar = CalendarApp.getCalendarById(calendarId); if (calendar === null) { // Calendar not found console.log('Calendar not found', calendarId); return; } let 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 let attendeeEmail = 'user@example.com'; // Email address of the person you need to remove let calendarId = 'calendar_123@group.calendar.google.com'; // ID of calendar with the events let startDate = new Date("YYYY-MM-DD"); // The first date to remove the guest from the events let endDate = new Date("YYYY-MM-DD"); // The last date to remove the attendee from the events let calendar = CalendarApp.getCalendarById(calendarId); if (calendar === null) { // Calendar not found console.log('Calendar not found', calendarId); return; } // Get the events within the specified timeframe let 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 (var i = 0; i < calEvents.length; i++) { let event = calEvents[i]; event.removeGuest(attendeeEmail); } }
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
email | String | मेहमान का ईमेल पता |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते 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'); }
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते 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'); }
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
anyoneCanAddSelf | Boolean | कोई भी व्यक्ति खुद को आमंत्रित कर सकता है या नहीं |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते 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'); }
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
color | String | स्ट्रिंग के तौर पर पूर्णांक वाला कलर इंडेक्स या CalendarApp.EventColor से मिली वैल्यू. |
रिटर्न
CalendarEventSeries
— यह कैलेंडर इवेंट, चेन बनाने के लिए है.
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते 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'); }
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
description | String | नया ब्यौरा |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते 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'); }
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
guestsCanInviteOthers | Boolean | क्या मेहमान अन्य लोगों को आमंत्रित कर सकते हैं |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API के सही स्कोप की मदद से अनुमति देना ज़रूरी होता है:
-
https://www.googleapis.com/auth/calendar
-
https://www.google.com/calendar/feeds
setGuestsCanModify(guestsCanModify)
सेट करता है कि मेहमान इवेंट में बदलाव कर सकते हैं या नहीं.
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
guestsCanModify | Boolean | क्या मेहमान इवेंट में बदलाव कर सकते हैं |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API के सही स्कोप की मदद से अनुमति देना ज़रूरी होता है:
-
https://www.googleapis.com/auth/calendar
-
https://www.google.com/calendar/feeds
setGuestsCanSeeGuests(guestsCanSeeGuests)
सेट करता है कि क्या मेहमान अन्य मेहमानों को देख सकते हैं.
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
guestsCanSeeGuests | Boolean | क्या मेहमान अन्य लोगों को देख सकते हैं |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते 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'); }
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
location | String | नई जगह |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते 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'); }
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
status | GuestStatus | नई स्थिति |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API के सही स्कोप की मदद से अनुमति देना ज़रूरी होता है:
-
https://www.googleapis.com/auth/calendar
-
https://www.googleapis.com/auth/calendar.readonly
-
https://www.google.com/calendar/feeds
setRecurrence(recurrence, startDate)
पूरे दिन के इवेंट की सीरीज़ के लिए, बार-बार होने के नियम सेट करता है. इस तरीके को लागू करने से, सामान्य इवेंट सीरीज़ पूरे दिन चलने वाली इवेंट सीरीज़ में बदल जाती है.
// Sets the events in a series to take place every Wednesday in 2013. var eventSeries = CalendarApp.getDefaultCalendar().getEventSeriesById('123456789@google.com'); var startDate = new Date('January 2, 2013 03:00:00 PM EST'); var recurrence = CalendarApp.newRecurrence().addWeeklyRule() .onlyOnWeekday(CalendarApp.Weekday.WEDNESDAY) .until(new Date('January 1, 2014')); eventSeries.setRecurrence(recurrence, startDate);
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
recurrence | EventRecurrence | इस्तेमाल करने के लिए, बार-बार लागू होने वाले नियम |
startDate | Date | सीरीज़ में पहले इवेंट की तारीख (सिर्फ़ दिन का इस्तेमाल किया जाता है; समय को अनदेखा किया जाता है) |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries सीरीज़ की चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API के सही स्कोप की मदद से अनुमति देना ज़रूरी होता है:
-
https://www.googleapis.com/auth/calendar
-
https://www.google.com/calendar/feeds
setRecurrence(recurrence, startTime, endTime)
इस इवेंट सीरीज़ के लिए, बार-बार होने के नियम सेट करता है. इस तरीके को लागू करने पर, पूरे दिन वाली इवेंट सीरीज़ एक सामान्य इवेंट सीरीज़ में बदल जाती है.
// Sets the events in a series to take place from 3pm to 4pm every Tuesday and Thursday in // 2013. var eventSeries = CalendarApp.getDefaultCalendar().getEventSeriesById('123456789@google.com'); var startTime = new Date('January 1, 2013 03:00:00 PM EST'); var endTime = new Date('January 1, 2013 04:00:00 PM EST'); var recurrence = CalendarApp.newRecurrence().addWeeklyRule() .onlyOnWeekdays([CalendarApp.Weekday.TUESDAY, CalendarApp.Weekday.THURSDAY]) .until(new Date('January 1, 2014')); eventSeries.setRecurrence(recurrence, startTime, endTime);
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
recurrence | EventRecurrence | इस्तेमाल करने के लिए, बार-बार लागू होने वाले नियम |
startTime | Date | सीरीज़ का पहला इवेंट शुरू होने की तारीख और समय |
endTime | Date | सीरीज़ का पहला इवेंट खत्म होने की तारीख और समय |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries सीरीज़ की चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API के सही स्कोप की मदद से अनुमति देना ज़रूरी होता है:
-
https://www.googleapis.com/auth/calendar
-
https://www.google.com/calendar/feeds
setTag(key, value)
कस्टम मेटाडेटा को सेव करने के लिए, इवेंट पर कुंजी/वैल्यू टैग सेट करता है.
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
key | String | टैग कुंजी |
value | String | टैग का मान |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते 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@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, 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'); }
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
title | String | नया टाइटल |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API के सही स्कोप की मदद से अनुमति देना ज़रूरी होता है:
-
https://www.googleapis.com/auth/calendar
-
https://www.google.com/calendar/feeds
setVisibility(visibility)
इवेंट की दृश्यता सेट करता है.
पैरामीटर
नाम | Type | ब्यौरा |
---|---|---|
visibility | Visibility |
रिटर्न
CalendarEventSeries
— यह CalendarEventSeries
चेन बनाने के लिए है
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या उससे ज़्यादा स्कोप या मिलते-जुलते REST API के सही स्कोप की मदद से अनुमति देना ज़रूरी होता है:
-
https://www.googleapis.com/auth/calendar
-
https://www.google.com/calendar/feeds