Class CalendarEvent

ক্যালেন্ডার ইভেন্ট

একটি একক ক্যালেন্ডার ইভেন্টের প্রতিনিধিত্ব করে।

পদ্ধতি

পদ্ধতি রিটার্ন টাইপ সংক্ষিপ্ত বর্ণনা
addEmailReminder(minutesBefore) CalendarEvent ইভেন্টে একটি নতুন ইমেল অনুস্মারক যোগ করে।
addGuest(email) CalendarEvent ইভেন্টে একজন অতিথিকে যোগ করে।
addPopupReminder(minutesBefore) CalendarEvent ইভেন্টে একটি নতুন পপ-আপ বিজ্ঞপ্তি যোগ করে।
addSmsReminder(minutesBefore) CalendarEvent ইভেন্টে একটি নতুন SMS অনুস্মারক যোগ করে৷
anyoneCanAddSelf() Boolean লোকেরা একটি ক্যালেন্ডার ইভেন্টে অতিথি হিসাবে নিজেদের যোগ করতে পারে কিনা তা নির্ধারণ করে৷
deleteEvent() void একটি ক্যালেন্ডার ইভেন্ট মুছে দেয়।
deleteTag(key) CalendarEvent ইভেন্ট থেকে একটি কী/মান ট্যাগ মুছে দেয়।
getAllDayEndDate() Date এই সমস্ত দিনের ক্যালেন্ডার ইভেন্ট শেষ হওয়ার তারিখটি পায়৷
getAllDayStartDate() Date এই সমস্ত দিনের ক্যালেন্ডার ইভেন্ট শুরু হওয়ার তারিখটি পায়৷
getAllTagKeys() String[] ইভেন্টে সেট করা ট্যাগগুলির জন্য সমস্ত কী পায়৷
getColor() String ক্যালেন্ডার ইভেন্টের রঙ ফেরত দেয়।
getCreators() String[] একটি ইভেন্টের নির্মাতাদের পায়।
getDateCreated() Date ইভেন্টটি তৈরি হওয়ার তারিখ পায়।
getDescription() String ঘটনার বিবরণ পায়।
getEmailReminders() Integer[] ইভেন্টের জন্য সমস্ত ইমেল অনুস্মারকের জন্য মিনিটের মান পায়।
getEndTime() Date এই ক্যালেন্ডার ইভেন্ট শেষ হওয়ার তারিখ এবং সময় পায়।
getEventSeries() CalendarEventSeries পুনরাবৃত্ত ইভেন্টগুলির সিরিজ পায় যা এই ইভেন্টের অন্তর্গত।
getGuestByEmail(email) EventGuest ইমেল ঠিকানা দ্বারা একটি অতিথি পায়.
getGuestList() EventGuest[] ইভেন্টের জন্য অতিথিদের পায়, ইভেন্টের মালিককে অন্তর্ভুক্ত করে না।
getGuestList(includeOwner) EventGuest[] ইভেন্টের জন্য অতিথিদের পায়, সম্ভাব্য ইভেন্ট মালিকদের সহ।
getId() String ইভেন্টের অনন্য iCalUID পায়।
getLastUpdated() Date ইভেন্টটি সর্বশেষ আপডেট হওয়ার তারিখ পায়।
getLocation() String অনুষ্ঠানের অবস্থান পায়।
getMyStatus() GuestStatus কার্যকর ব্যবহারকারীর ইভেন্ট স্থিতি (যেমন উপস্থিত বা আমন্ত্রিত) পায়।
getOriginalCalendarId() String ক্যালেন্ডারের আইডি পান যেখানে এই ইভেন্টটি মূলত তৈরি করা হয়েছিল৷
getPopupReminders() Integer[] ইভেন্টের জন্য সমস্ত পপ-আপ অনুস্মারকের জন্য মিনিটের মান পায়৷
getSmsReminders() Integer[] ইভেন্টের জন্য সমস্ত SMS অনুস্মারকের জন্য মিনিটের মান পায়।
getStartTime() Date এই ক্যালেন্ডার ইভেন্ট শুরু হওয়ার তারিখ এবং সময় পায়৷
getTag(key) String ইভেন্টের একটি ট্যাগ মান পায়।
getTitle() String অনুষ্ঠানের শিরোনাম পায়।
getVisibility() Visibility অনুষ্ঠানের দৃশ্যমানতা পায়।
guestsCanInviteOthers() Boolean অতিথিরা অন্য অতিথিদের আমন্ত্রণ জানাতে পারে কিনা তা নির্ধারণ করে।
guestsCanModify() Boolean অতিথিরা ইভেন্টটি পরিবর্তন করতে পারে কিনা তা নির্ধারণ করে।
guestsCanSeeGuests() Boolean অতিথিরা অন্য অতিথিদের দেখতে পাবে কিনা তা নির্ধারণ করে।
isAllDayEvent() Boolean এটি একটি সারাদিনের ঘটনা কিনা তা নির্ধারণ করে।
isOwnedByMe() Boolean আপনি ইভেন্টের মালিক কিনা তা নির্ধারণ করে।
isRecurringEvent() Boolean ইভেন্টটি একটি ইভেন্ট সিরিজের অংশ কিনা তা নির্ধারণ করে।
removeAllReminders() CalendarEvent ইভেন্ট থেকে সমস্ত অনুস্মারক সরিয়ে দেয়।
removeGuest(email) CalendarEvent ইভেন্ট থেকে একজন অতিথিকে সরিয়ে দেয়।
resetRemindersToDefault() CalendarEvent ক্যালেন্ডারের ডিফল্ট সেটিংস ব্যবহার করে অনুস্মারকগুলি পুনরায় সেট করে৷
setAllDayDate(date) CalendarEvent অনুষ্ঠানের তারিখ নির্ধারণ করে।
setAllDayDates(startDate, endDate) CalendarEvent অনুষ্ঠানের তারিখ নির্ধারণ করে।
setAnyoneCanAddSelf(anyoneCanAddSelf) CalendarEvent অ-অতিথিরা ইভেন্টে নিজেদের যোগ করতে পারবে কিনা তা সেট করে।
setColor(color) CalendarEvent ক্যালেন্ডার ইভেন্টের রঙ সেট করে।
setDescription(description) CalendarEvent ইভেন্টের বর্ণনা সেট করে।
setGuestsCanInviteOthers(guestsCanInviteOthers) CalendarEvent অতিথিরা অন্য অতিথিদের আমন্ত্রণ জানাতে পারে কিনা তা সেট করে।
setGuestsCanModify(guestsCanModify) CalendarEvent অতিথিরা ইভেন্টটি পরিবর্তন করতে পারে কিনা তা সেট করে।
setGuestsCanSeeGuests(guestsCanSeeGuests) CalendarEvent অতিথিরা অন্য অতিথিদের দেখতে পাবে কিনা তা সেট করে।
setLocation(location) CalendarEvent ইভেন্টের অবস্থান সেট করে।
setMyStatus(status) CalendarEvent কার্যকর ব্যবহারকারীর ইভেন্ট স্থিতি (যেমন উপস্থিত বা আমন্ত্রিত) সেট করে।
setTag(key, value) CalendarEvent কাস্টম মেটাডেটা সংরক্ষণের জন্য ইভেন্টে একটি কী/মান ট্যাগ সেট করে।
setTime(startTime, endTime) CalendarEvent ইভেন্টের শুরু এবং শেষের জন্য তারিখ এবং সময় সেট করে।
setTitle(title) CalendarEvent ইভেন্টের শিরোনাম সেট করে।
setVisibility(visibility) CalendarEvent ইভেন্টের দৃশ্যমানতা সেট করে।

বিস্তারিত ডকুমেন্টেশন

addEmailReminder(minutesBefore)

ইভেন্টে একটি নতুন ইমেল অনুস্মারক যোগ করে। অনুস্মারকটি ইভেন্টের আগে কমপক্ষে 5 মিনিট এবং সর্বাধিক 4 সপ্তাহ (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 an email notification for 15 minutes before the event.
event.addEmailReminder(15);

পরামিতি

নাম টাইপ বর্ণনা
minutesBefore Integer ইভেন্টের আগে মিনিটের সংখ্যা

প্রত্যাবর্তন

CalendarEvent — চেইন করার জন্য এই CalendarEvent

নিক্ষেপ করে

Error — যদি ইভেন্টে 5টির বেশি অনুস্মারক থাকে বা সময়টি আইনি সীমার মধ্যে না থাকে

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের জন্য নিম্নলিখিত এক বা একাধিক স্কোপ বা সংশ্লিষ্ট 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);
  }
}

পরামিতি

নাম টাইপ বর্ণনা
email String অতিথির ইমেল ঠিকানা।

প্রত্যাবর্তন

CalendarEvent - চেইন করার জন্য এই CalendarEvent

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের জন্য নিম্নলিখিত এক বা একাধিক স্কোপ বা সংশ্লিষ্ট REST API থেকে উপযুক্ত স্কোপের অনুমোদন প্রয়োজন:

  • https://www.googleapis.com/auth/calendar
  • https://www.google.com/calendar/feeds

addPopupReminder(minutesBefore)

ইভেন্টে একটি নতুন পপ-আপ বিজ্ঞপ্তি যোগ করে। ইভেন্টের আগে বিজ্ঞপ্তিটি কমপক্ষে 5 মিনিট এবং সর্বাধিক 4 সপ্তাহ (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);

পরামিতি

নাম টাইপ বর্ণনা
minutesBefore Integer ইভেন্টের আগে মিনিটের সংখ্যা

প্রত্যাবর্তন

CalendarEvent — চেইন করার জন্য এই CalendarEvent

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের জন্য নিম্নলিখিত এক বা একাধিক স্কোপ বা সংশ্লিষ্ট REST API থেকে উপযুক্ত স্কোপের অনুমোদন প্রয়োজন:

  • https://www.googleapis.com/auth/calendar
  • https://www.google.com/calendar/feeds

addSmsReminder(minutesBefore)

ইভেন্টে একটি নতুন SMS অনুস্মারক যোগ করে৷ অনুস্মারকটি ইভেন্টের আগে কমপক্ষে 5 মিনিট এবং সর্বাধিক 4 সপ্তাহ (40320 মিনিট) হতে হবে।

পরামিতি

নাম টাইপ বর্ণনা
minutesBefore Integer ইভেন্টের আগে মিনিটের সংখ্যা

প্রত্যাবর্তন

CalendarEvent — চেইন করার জন্য এই CalendarEvent

নিক্ষেপ করে

Error — যদি ইভেন্টে 5টির বেশি অনুস্মারক থাকে বা সময়টি আইনি সীমার মধ্যে না থাকে

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের জন্য নিম্নলিখিত এক বা একাধিক স্কোপ বা সংশ্লিষ্ট 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());

প্রত্যাবর্তন

Booleantrue যদি অ-অতিথিরা ইভেন্টে নিজেদের যোগ করতে পারে; false না হলে

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের জন্য নিম্নলিখিত এক বা একাধিক স্কোপ বা সংশ্লিষ্ট REST API থেকে উপযুক্ত স্কোপের অনুমোদন প্রয়োজন:

  • https://www.googleapis.com/auth/calendar
  • https://www.googleapis.com/auth/calendar.readonly
  • https://www.google.com/calendar/feeds

deleteEvent()

একটি ক্যালেন্ডার ইভেন্ট মুছে দেয়।

// 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);

প্রত্যাবর্তন

StringCalendarApp.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

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 — গেস্ট, বা নাল যদি ইমেল ঠিকানাটি অতিথির সাথে সঙ্গতিপূর্ণ না হয়

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের জন্য নিম্নলিখিত এক বা একাধিক স্কোপ বা সংশ্লিষ্ট 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());
}

পরামিতি

নাম টাইপ বর্ণনা
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 পায়। মনে রাখবেন যে iCalUID এবং ক্যালেন্ডার v3 API এবং ক্যালেন্ডার উন্নত পরিষেবা দ্বারা ব্যবহৃত ইভেন্ট 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()

ইভেন্টের জন্য সমস্ত SMS অনুস্মারকের জন্য মিনিটের মান পায়।

প্রত্যাবর্তন

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@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');
}

প্রত্যাবর্তন

Booleantrue যদি অতিথিরা অন্যদের আমন্ত্রণ জানাতে পারে; 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');
}

প্রত্যাবর্তন

Booleantrue যদি অতিথিরা ইভেন্টটি পরিবর্তন করতে পারে; 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');
}

প্রত্যাবর্তন

Booleantrue যদি অতিথিরা অন্য অতিথিদের দেখতে পায়; 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());

প্রত্যাবর্তন

Booleantrue যদি ঘটনাটি সারাদিন হয়; 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');
}

প্রত্যাবর্তন

Booleantrue যদি ইভেন্টটি কার্যকর ব্যবহারকারীর মালিকানাধীন হয়; 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');
}

প্রত্যাবর্তন

Booleantrue যদি ঘটনাটি একটি ইভেন্ট সিরিজের অংশ হয়; 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
  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);
  }
}

পরামিতি

নাম টাইপ বর্ণনা
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 — চেইন করার জন্য এই ক্যালেন্ডার ইভেন্ট

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের জন্য নিম্নলিখিত এক বা একাধিক স্কোপ বা সংশ্লিষ্ট 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');
}

পরামিতি

নাম টাইপ বর্ণনা
startDate Date ইভেন্ট শুরু হওয়ার তারিখ (সময় উপেক্ষা করা হয়)
endDate Date ইভেন্ট শেষ হওয়ার তারিখ (সময় উপেক্ষা করা হয়)

প্রত্যাবর্তন

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');
}

পরামিতি

নাম টাইপ বর্ণনা
anyoneCanAddSelf 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 একটি স্ট্রিং হিসাবে একটি পূর্ণসংখ্যা রঙ সূচক, বা CalendarApp.EventColor থেকে একটি মান।

প্রত্যাবর্তন

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');
}

পরামিতি

নাম টাইপ বর্ণনা
guestsCanInviteOthers Boolean অতিথিরা অন্যদের আমন্ত্রণ জানাতে পারেন কিনা

প্রত্যাবর্তন

CalendarEvent — চেইন করার জন্য এই CalendarEvent

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের জন্য নিম্নলিখিত এক বা একাধিক স্কোপ বা সংশ্লিষ্ট REST API থেকে উপযুক্ত স্কোপের অনুমোদন প্রয়োজন:

  • https://www.googleapis.com/auth/calendar
  • https://www.google.com/calendar/feeds

setGuestsCanModify(guestsCanModify)

অতিথিরা ইভেন্টটি পরিবর্তন করতে পারে কিনা তা সেট করে।

পরামিতি

নাম টাইপ বর্ণনা
guestsCanModify Boolean অতিথিরা ইভেন্টটি পরিবর্তন করতে পারে কিনা

প্রত্যাবর্তন

CalendarEvent — চেইন করার জন্য এই CalendarEvent

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের জন্য নিম্নলিখিত এক বা একাধিক স্কোপ বা সংশ্লিষ্ট REST API থেকে উপযুক্ত স্কোপের অনুমোদন প্রয়োজন:

  • https://www.googleapis.com/auth/calendar
  • https://www.google.com/calendar/feeds

setGuestsCanSeeGuests(guestsCanSeeGuests)

অতিথিরা অন্য অতিথিদের দেখতে পাবে কিনা তা সেট করে।

পরামিতি

নাম টাইপ বর্ণনা
guestsCanSeeGuests 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 GuestStatus নতুন স্ট্যাটাস

প্রত্যাবর্তন

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);

পরামিতি

নাম টাইপ বর্ণনা
startTime Date ইভেন্টের নতুন শুরু
endTime Date ইভেন্টের নতুন শেষ

প্রত্যাবর্তন

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@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');
}

পরামিতি

নাম টাইপ বর্ণনা
title String নতুন শিরোনাম

প্রত্যাবর্তন

CalendarEvent — চেইন করার জন্য এই CalendarEvent

অনুমোদন

যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের জন্য নিম্নলিখিত এক বা একাধিক স্কোপ বা সংশ্লিষ্ট 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