CalendarList: watch
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Perhatikan perubahan pada resource CalendarList.
Permintaan
Permintaan HTTP
POST https://www.googleapis.com/calendar/v3/users/me/calendarList/watch
Parameter
Nama parameter |
Nilai |
Deskripsi |
Otorisasi
Permintaan ini memerlukan otorisasi dengan setidaknya salah satu cakupan berikut:
Cakupan |
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 |
Untuk mengetahui informasi selengkapnya, lihat halaman autentikasi dan otorisasi.
Isi permintaan
Dalam isi permintaan, berikan data dengan struktur berikut:
{
"id": string,
"token": string,
"type": string,
"address": string,
"params": {
"ttl": string
}
}
Nama properti |
Nilai |
Deskripsi |
Catatan |
id |
string |
UUID atau string unik serupa yang mengidentifikasi channel ini. |
|
token |
string |
String arbitrer yang dikirim ke alamat target dengan setiap notifikasi yang dikirim melalui saluran ini. Opsional. |
|
type |
string |
Jenis mekanisme pengiriman yang digunakan untuk saluran ini. Nilai yang valid adalah "web_hook " (atau "webhook "). Kedua nilai tersebut merujuk ke saluran tempat permintaan Http digunakan untuk mengirimkan pesan. |
|
address |
string |
Alamat tempat notifikasi dikirim untuk saluran ini. |
|
params |
object |
Parameter tambahan yang mengontrol perilaku saluran pengiriman. Opsional. |
|
params.ttl |
string |
Time-to-live dalam detik untuk saluran notifikasi. Defaultnya adalah 604.800 detik. |
|
Respons
Jika berhasil, metode ini akan menampilkan isi respons dengan struktur berikut:
{
"kind": "api#channel",
"id": string,
"resourceId": string,
"resourceUri": string,
"token": string,
"expiration": long
}
Nama properti |
Nilai |
Deskripsi |
Catatan |
kind |
string |
Mengidentifikasinya sebagai saluran notifikasi yang digunakan untuk memantau perubahan pada resource, yaitu "api#channel ". |
|
id |
string |
UUID atau string unik serupa yang mengidentifikasi channel ini. |
|
resourceId |
string |
ID buram yang mengidentifikasi resource yang sedang ditonton di channel ini. Stabil di berbagai versi API. |
|
resourceUri |
string |
ID khusus versi untuk resource yang dipantau. |
|
token |
string |
String arbitrer yang dikirim ke alamat target dengan setiap notifikasi yang dikirim melalui saluran ini. Opsional. |
|
expiration |
long |
Tanggal dan waktu berakhirnya masa berlaku saluran notifikasi, yang dinyatakan sebagai stempel waktu Unix, dalam milidetik. Opsional. |
|
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-25 UTC.
[null,null,["Terakhir diperbarui pada 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. | |"]]