REST Resource: channels
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
منبع: کانال
یک کانال اطلاع رسانی که برای مشاهده تغییرات منابع استفاده می شود.
نمایندگی JSON |
---|
{
"params": {
string: string,
...
},
"payload": boolean,
"id": string,
"resourceId": string,
"resourceUri": string,
"token": string,
"expiration": string,
"type": string,
"address": string,
"kind": string
} |
فیلدها |
---|
params | map (key: string, value: string) پارامترهای اضافی کنترل کننده رفتار کانال تحویل اختیاری. یک شی حاوی لیستی از "key": value . مثال: { "name": "wrench", "mass": "1.3kg", "count": "3" } . |
payload | boolean یک مقدار Boolean برای نشان دادن اینکه آیا محموله مورد نظر است یا خیر. اختیاری. |
id | string یک UUID یا یک رشته منحصر به فرد مشابه که این کانال را شناسایی می کند. |
resourceId | string یک شناسه غیر شفاف که منبع در حال تماشا را در این کانال مشخص می کند. در نسخه های مختلف API پایدار است. |
resourceUri | string یک شناسه مخصوص نسخه برای منبع تماشا شده. |
token | string یک رشته دلخواه با هر اعلان از طریق این کانال به آدرس مورد نظر تحویل داده می شود. اختیاری. |
expiration | string ( int64 format) تاریخ و زمان انقضای کانال اعلان، به صورت مهر زمانی یونیکس، در میلی ثانیه بیان می شود. اختیاری. |
type | string نوع مکانیزم تحویل مورد استفاده برای این کانال. مقادیر معتبر "web_hook" یا "webhook" هستند. |
address | string آدرسی که اعلانهای این کانال در آن ارسال میشود. |
kind | string این را به عنوان یک کانال اعلان شناسایی می کند که برای مشاهده تغییرات در یک منبع، که api#channel است، استفاده می شود. |
روش ها |
---|
| تماشای منابع از طریق این کانال را متوقف می کند. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# REST Resource: channels\n\n- [Resource: Channel](#Channel)\n - [JSON representation](#Channel.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Channel\n-----------------\n\nA notification channel used to watch for resource changes.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"params\": { string: string, ... }, \"payload\": boolean, \"id\": string, \"resourceId\": string, \"resourceUri\": string, \"token\": string, \"expiration\": string, \"type\": string, \"address\": string, \"kind\": string } ``` |\n\n| Fields ||\n|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `params` | `map (key: string, value: string)` Additional parameters controlling delivery channel behavior. Optional. An object containing a list of `\"key\": value` pairs. Example: `{ \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }`. |\n| `payload` | `boolean` A Boolean value to indicate whether payload is wanted. Optional. |\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` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. |\n| `type` | `string` The type of delivery mechanism used for this channel. Valid values are \"web_hook\" or \"webhook\". |\n| `address` | `string` The address where notifications are delivered for this channel. |\n| `kind` | `string` Identifies this as a notification channel used to watch for changes to a resource, which is `api#channel`. |\n\n| Methods ------- ||\n|------------------------------------------------------------------|------------------------------------------------|\n| ### [stop](/workspace/drive/api/reference/rest/v3/channels/stop) | Stops watching resources through this channel. |"]]