Groups Service
網路論壇
這項服務可讓指令碼存取 Google 群組。可用於查詢群組電子郵件地址或使用者直接加入的群組清單等資訊。以下範例說明目前使用者所屬的群組數量:
var groups = GroupsApp.getGroups();
Logger.log('You are a member of %s Google Groups.', groups.length);
類別
名稱 | 簡短說明 |
Group | 群組物件,可查詢群組成員和成員在群組中的角色。 |
GroupsApp | 這個類別可讓您存取 Google 群組資訊。 |
Role | 使用者在群組中的可能角色,例如擁有者或一般成員。 |
屬性
屬性 | 類型 | 說明 |
OWNER | Enum | 群組擁有者。 |
MANAGER | Enum | 群組管理員。 |
MEMBER | Enum | 使用者是這個群組的成員,但不是擁有者或管理員。 |
INVITED | Enum | 使用者已獲邀加入群組,但尚未接受邀請。 |
PENDING | Enum | 已提出加入群組要求,但尚未獲得群組擁有者或管理員核准的使用者。 |
BANNED | Enum | 使用者已遭停權,無法嘗試加入群組。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-12-22 (世界標準時間)。
[null,null,["上次更新時間:2024-12-22 (世界標準時間)。"],[[["The Groups service enables scripts to interact with Google Groups, allowing tasks like retrieving group details and user memberships."],["The `Group` class represents a Google Group, providing methods to access its email, members, roles, and child groups."],["The `GroupsApp` class provides methods for retrieving group information, such as finding a group by email or listing a user's memberships."],["The `Role` enum defines the possible roles a user can have within a group (e.g., OWNER, MEMBER)."]]],[]]