Method: spaces.spaceEvents.get

یک رویداد را از فضای چت گوگل برمی‌گرداند. بار داده رویداد شامل جدیدترین نسخه منبعی است که تغییر کرده است. برای مثال، اگر رویدادی را در مورد یک پیام جدید درخواست کنید اما پیام بعداً به‌روزرسانی شود، سرور منبع Message به‌روزرسانی‌شده را در بار داده رویداد برمی‌گرداند.

نکته: فیلد permissionSettings در شیء Space از داده‌های رویداد Space برای این درخواست برگردانده نمی‌شود.

از انواع احراز هویت زیر با دامنه مجوز مناسب برای خواندن داده‌های درخواستی پشتیبانی می‌کند:

  • احراز هویت برنامه با تأیید مدیر با یکی از حوزه‌های مجوز زیر:

    • https://www.googleapis.com/auth/chat.app.spaces
    • https://www.googleapis.com/auth/chat.app.spaces.readonly
    • https://www.googleapis.com/auth/chat.app.messages.readonly
    • https://www.googleapis.com/auth/chat.app.memberships
    • https://www.googleapis.com/auth/chat.app.memberships.readonly
  • احراز هویت کاربر با یکی از حوزه‌های مجوز زیر:

    • https://www.googleapis.com/auth/chat.spaces.readonly
    • https://www.googleapis.com/auth/chat.spaces
    • https://www.googleapis.com/auth/chat.messages.readonly
    • https://www.googleapis.com/auth/chat.messages
    • https://www.googleapis.com/auth/chat.messages.reactions.readonly
    • https://www.googleapis.com/auth/chat.messages.reactions
    • https://www.googleapis.com/auth/chat.memberships.readonly
    • https://www.googleapis.com/auth/chat.memberships

برای دریافت یک رویداد، تماس‌گیرنده‌ی احراز هویت‌شده باید عضوی از آن فضا باشد.

برای مثال، به «دریافت جزئیات مربوط به یک رویداد از فضای چت گوگل» مراجعه کنید.

درخواست HTTP

GET https://chat.googleapis.com/v1/{name=spaces/*/spaceEvents/*}

این URL از سینتکس Transcoding در gRPC استفاده می‌کند.

پارامترهای مسیر

پارامترها
name

string

الزامی. نام منبع رویداد فضایی.

قالب: spaces/{space}/spaceEvents/{spaceEvent}

درخواست بدنه

بدنه درخواست باید خالی باشد.

بدنه پاسخ

در صورت موفقیت، بدنه پاسخ شامل نمونه‌ای از SpaceEvent است.

دامنه‌های مجوز

به یکی از حوزه‌های OAuth زیر نیاز دارد:

  • https://www.googleapis.com/auth/chat.app.memberships
  • https://www.googleapis.com/auth/chat.app.memberships.readonly
  • https://www.googleapis.com/auth/chat.app.messages.readonly
  • https://www.googleapis.com/auth/chat.app.spaces
  • https://www.googleapis.com/auth/chat.app.spaces.readonly
  • https://www.googleapis.com/auth/chat.spaces
  • https://www.googleapis.com/auth/chat.spaces.readonly
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.readonly
  • https://www.googleapis.com/auth/chat.memberships
  • https://www.googleapis.com/auth/chat.memberships.readonly
  • https://www.googleapis.com/auth/chat.messages.reactions
  • https://www.googleapis.com/auth/chat.messages.reactions.readonly

برای اطلاعات بیشتر، به راهنمای مجوز مراجعه کنید.