বর্ধিত বৈশিষ্ট্য

The fields of the Events resources cover the most common data associated with an event, such as location, start time, etc, but applications may want to store additional metadata specific to their use case. The Calendar API provides the ability to set hidden key-value pairs with an event, called extended properties . Extended properties make it easy to store application-specific data for an event without having to utilize an external database.

দৃশ্যমানতা

There are two types of extended properties available: private and shared. Shared properties are visible and editable by all attendees of an event, while private properties are set on one attendee's local "copy" of the event. More concretely, private properties are specific to the calendarId and eventId used in the request, while shared properties will be shown regardless of the calendarId used in the request.

বৈশিষ্ট্য যোগ ও আপডেট করুন

Extended properties are set on the Events resource, and like other fields can be set in insert , update , and patch requests. Using patch requests is the preferred method, as it allows you to manipulate some properties while leaving others untouched. Adding a new property with the same key will overwrite any existing properties with the same key. The following example shows setting a private property:

PATCH https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId
{
  "extendedProperties": {
    "private": {
      "petsAllowed": "yes"
    }
  }
}

প্রোপার্টিগুলো মুছে ফেলুন

আপডেট অনুরোধে অন্তর্ভুক্ত নয় এমন যেকোনো প্রপার্টি মুছে ফেলা হবে, কিন্তু এর চেয়ে ভালো উপায় হলো একটি প্যাচ অনুরোধ করে মানটিকে null-এ সেট করা। নিচের উদাহরণটিতে একটি প্রাইভেট প্রপার্টি মুছে ফেলার পদ্ধতি দেখানো হয়েছে:

PATCH https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId
{
  "extendedProperties": {
    "private": {
      "petsAllowed": null
    }
  }
}

সম্পত্তি অনুসন্ধান করুন

You can search events based on the values on their extended properties using an Events.list request. Set the field privateExtendedProperty or sharedExtendedProperty to a constraint in the format propertyName=value , which searches against private and shared properties respectively. The following example returns events with the private property petsAllowed=yes :

GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events
    ?privateExtendedProperty=petsAllowed%3Dyes

আপনি এই ফিল্ডগুলো একাধিকবার পুনরাবৃত্তি করতে পারেন এবং শর্তগুলো OR দ্বারা যুক্ত করা হয়, তাই ইভেন্টগুলো ফেরত পাওয়ার জন্য শুধুমাত্র একটি শর্তের সাথে মিললেই চলে। নিম্নলিখিত উদাহরণটি petsAllowed=yes অথবা isOutside=yes প্রাইভেট প্রপার্টিযুক্ত ইভেন্টগুলো খুঁজে বের করে:

GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events
    ?privateExtendedProperty=petsAllowed%3Dyes
    &privateExtendedProperty=isOutside%3Dyes

মনে রাখবেন যে প্রাইভেট এবং শেয়ার্ড প্রপার্টির সীমাবদ্ধতাগুলো একসাথে AND করা হয়, তাই ইভেন্টগুলো ফেরত পাওয়ার জন্য সেগুলোকে অবশ্যই উভয় সেটের সীমাবদ্ধতার সাথে মিলতে হবে। নিম্নলিখিত উদাহরণটি petsAllowed=yes প্রাইভেট প্রপার্টি এবং createdBy=myApp পাবলিক প্রপার্টি সহ ইভেন্টগুলো খুঁজে বের করে:

GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events
    ?privateExtendedProperty=petsAllowed%3Dyes
    &sharedExtendedProperty=createdBy%3DmyApp

সীমা

  1. একটি প্রপার্টির কী-এর সর্বোচ্চ আকার ৪৪ অক্ষর, এবং এর চেয়ে দীর্ঘ কী-যুক্ত প্রপার্টিগুলো নীরবে বাদ দেওয়া হবে।
  2. একটি প্রপার্টির মানের সর্বোচ্চ আকার ১০২৪ অক্ষর, এবং এর চেয়ে দীর্ঘ মানযুক্ত প্রপার্টিগুলো স্বয়ংক্রিয়ভাবে সংক্ষিপ্ত করা হবে।
  3. একটি ইভেন্টে সর্বোচ্চ ৩০০টি প্রপার্টি থাকতে পারে, যেগুলোর মোট আকার (কী-এর আকার + ভ্যালুর আকার) ৩২ কিলোবাইট পর্যন্ত হতে পারে। এই ৩০০টি প্রপার্টির মধ্যে শেয়ার্ড এবং প্রাইভেট প্রপার্টি অন্তর্ভুক্ত থাকে, যা ইভেন্টটির সমস্ত "কপি"-র ক্ষেত্রেই প্রযোজ্য।