CalendarList: watch
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
לעקוב אחרי שינויים במשאבי CalendarList.
בקשה
בקשת HTTP
POST https://www.googleapis.com/calendar/v3/users/me/calendarList/watch
פרמטרים
אישור
הבקשה הזו דורשת הרשאה עם לפחות אחד מההיקפים הבאים:
היקף |
https://www.googleapis.com/auth/calendar.readonly |
https://www.googleapis.com/auth/calendar |
https://www.googleapis.com/auth/calendar.calendarlist |
https://www.googleapis.com/auth/calendar.calendarlist.readonly |
מידע נוסף זמין בדף אימות והרשאה.
גוף הבקשה
בגוף הבקשה, מספקים נתונים במבנה הבא:
{
"id": string,
"token": string,
"type": string,
"address": string,
"params": {
"ttl": string
}
}
שם הנכס |
ערך |
תיאור |
הערות |
id |
string |
מזהה UUID או מחרוזת ייחודית דומה שמזהה את הערוץ הזה. |
|
token |
string |
מחרוזת שרירותית שנשלחת לכתובת היעד עם כל התראה שנשלחת דרך הערוץ הזה. זה שינוי אופציונלי. |
|
type |
string |
סוג מנגנון המסירה שבו נעשה שימוש בערוץ הזה. הערכים החוקיים הם web_hook (או webhook ). שני הערכים מתייחסים לערוץ שבו נעשה שימוש בבקשות Http כדי להעביר הודעות. |
|
address |
string |
הכתובת שאליה יישלחו ההתראות מהערוץ הזה. |
|
params |
object |
פרמטרים נוספים ששולטים בהתנהגות של ערוץ העברת הנתונים. זה שינוי אופציונלי. |
|
params.ttl |
string |
משך החיים בשניות של ערוץ ההתראות. ברירת המחדל היא 604,800 שניות. |
|
תשובה
אם הפעולה בוצעה ללא שגיאות, ה-method מחזיר גוף תגובה עם המבנה הבא:
{
"kind": "api#channel",
"id": string,
"resourceId": string,
"resourceUri": string,
"token": string,
"expiration": long
}
שם הנכס |
ערך |
תיאור |
הערות |
kind |
string |
זהו ערוץ התראות שמשמש למעקב אחרי שינויים במשאב 'api#channel '. |
|
id |
string |
מזהה UUID או מחרוזת ייחודית דומה שמזהה את הערוץ הזה. |
|
resourceId |
string |
מזהה אטום שמזהה את המשאב שצופים בו בערוץ הזה. יציבה בגרסאות שונות של ממשקי API. |
|
resourceUri |
string |
מזהה ספציפי לגרסה של המשאב במעקב. |
|
token |
string |
מחרוזת שרירותית שנשלחת לכתובת היעד עם כל התראה שנשלחת דרך הערוץ הזה. זה שינוי אופציונלי. |
|
expiration |
long |
התאריך והשעה של תפוגת ערוץ ההתראות, כפי שמצוינים בחותמת זמן של מערכת Unix, באלפיות שנייה. זה שינוי אופציונלי. |
|
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],[],null,["# CalendarList: watch\n\n| **Note:** Requires [authorization](#auth).\n\nWatch for changes to CalendarList resources.\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://www.googleapis.com/calendar/v3/users/me/calendarList/watch\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|-------|-------------|\n\n### Authorization\n\nThis request requires authorization with at least one of the following scopes:\n\n| Scope |\n|------------------------------------------------------------------|\n| `https://www.googleapis.com/auth/calendar.readonly` |\n| `https://www.googleapis.com/auth/calendar` |\n| `https://www.googleapis.com/auth/calendar.calendarlist` |\n| `https://www.googleapis.com/auth/calendar.calendarlist.readonly` |\n\nFor more information, see the [authentication and authorization](/workspace/guides/configure-oauth-consent) page.\n\n### Request body\n\nIn the request body, supply data with the following structure:\n\n```carbon\n{\n \"id\": string,\n \"token\": string,\n \"type\": string,\n \"address\": string,\n \"params\": {\n \"ttl\": string\n }\n}\n```\n\n| Property name | Value | Description | Notes |\n|---------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| `id` | `string` | A UUID or similar unique string that identifies this channel. | |\n| `token` | `string` | An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. | |\n| `type` | `string` | The type of delivery mechanism used for this channel. Valid values are \"`web_hook`\" (or \"`webhook`\"). Both values refer to a channel where Http requests are used to deliver messages. | |\n| `address` | `string` | The address where notifications are delivered for this channel. | |\n| `params` | `object` | Additional parameters controlling delivery channel behavior. Optional. | |\n| params.`ttl` | `string` | The time-to-live in seconds for the notification channel. Default is 604800 seconds. | |\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure:\n\n```text\n{\n \"kind\": \"api#channel\",\n \"id\": string,\n \"resourceId\": string,\n \"resourceUri\": string,\n \"token\": string,\n \"expiration\": long\n}\n```\n\n| Property name | Value | Description | Notes |\n|---------------|----------|-------------------------------------------------------------------------------------------------------------------|-------|\n| `kind` | `string` | Identifies this as a notification channel used to watch for changes to a resource, which is \"`api#channel`\". | |\n| `id` | `string` | A UUID or similar unique string that identifies this channel. | |\n| `resourceId` | `string` | An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. | |\n| `resourceUri` | `string` | A version-specific identifier for the watched resource. | |\n| `token` | `string` | An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. | |\n| `expiration` | `long` | Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. | |"]]