Show / Hide Table of Contents

Class SpacesResource.MembersResource

The "members" collection of methods.

Inheritance
object
SpacesResource.MembersResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.HangoutsChat.v1
Assembly: Google.Apis.HangoutsChat.v1.dll
Syntax
public class SpacesResource.MembersResource

Constructors

MembersResource(IClientService)

Constructs a new resource.

Declaration
public MembersResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

Create(Membership, string)

Creates a membership for the calling Chat app, a user, or a Google Group. Creating memberships for other Chat apps isn't supported. When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Supports the following types of authentication: - App authentication with administrator approval in Developer Preview and the authorization scope: - https://www.googleapis.com/auth/chat.app.memberships - User authentication with one of the following authorization scopes: - https://www.googleapis.com/auth/chat.memberships - https://www.googleapis.com/auth/chat.memberships.app (to add the calling app to the space) - https://www.googleapis.com/auth/chat.import (import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates, use_admin_access is true, and the following authorization scope is used: - https://www.googleapis.com/auth/chat.admin.memberships For example usage, see: - Invite or add a user to a space. - Invite or add a Google Group to a space. - Add the Chat app to a space.

Declaration
public virtual SpacesResource.MembersResource.CreateRequest Create(Membership body, string parent)
Parameters
Type Name Description
Membership body

The body of the request.

string parent

Required. The resource name of the space for which to create the membership. Format: spaces/{space}

Returns
Type Description
SpacesResource.MembersResource.CreateRequest

Delete(string)

Deletes a membership. For an example, see Remove a user or a Google Chat app from a space. Supports the following types of authentication: - App authentication with administrator approval in Developer Preview and the authorization scope: - https://www.googleapis.com/auth/chat.app.memberships - User authentication with one of the following authorization scopes: - https://www.googleapis.com/auth/chat.memberships - https://www.googleapis.com/auth/chat.memberships.app (to remove the calling app from the space) - https://www.googleapis.com/auth/chat.import (import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates, use_admin_access is true, and the following authorization scope is used: - https://www.googleapis.com/auth/chat.admin.memberships To delete memberships for space managers, the requester must be a space manager. If you're using app authentication the application must be the space creator.

Declaration
public virtual SpacesResource.MembersResource.DeleteRequest Delete(string name)
Parameters
Type Name Description
string name

Required. Resource name of the membership to delete. Chat apps can delete human users' or their own memberships. Chat apps can't delete other apps' memberships. When deleting a human membership, requires the chat.memberships scope with user authentication or the chat.memberships.app scope with app authentication and the spaces/{space}/members/{member} format. You can use the email as an alias for {member}. For example, spaces/{space}/members/example@gmail.com where example@gmail.com is the email of the Google Chat user. When deleting an app membership, requires the chat.memberships.app scope and spaces/{space}/members/app format. Format: spaces/{space}/members/{member} or spaces/{space}/members/app.

Returns
Type Description
SpacesResource.MembersResource.DeleteRequest

Get(string)

Returns details about a membership. For an example, see Get details about a user's or Google Chat app's membership. Supports the following types of authentication: - App authentication with the authorization scope: - https://www.googleapis.com/auth/chat.bot - User authentication with one of the following authorization scopes: - https://www.googleapis.com/auth/chat.memberships.readonly - https://www.googleapis.com/auth/chat.memberships - User authentication grants administrator privileges when an administrator account authenticates, use_admin_access is true, and one of the following authorization scopes is used: - https://www.googleapis.com/auth/chat.admin.memberships.readonly - https://www.googleapis.com/auth/chat.admin.memberships

Declaration
public virtual SpacesResource.MembersResource.GetRequest Get(string name)
Parameters
Type Name Description
string name

Required. Resource name of the membership to retrieve. To get the app's own membership by using user authentication, you can optionally use spaces/{space}/members/app. Format: spaces/{space}/members/{member} or spaces/{space}/members/app You can use the user's email as an alias for {member}. For example, spaces/{space}/members/example@gmail.com where example@gmail.com is the email of the Google Chat user.

Returns
Type Description
SpacesResource.MembersResource.GetRequest

List(string)

Lists memberships in a space. For an example, see List users and Google Chat apps in a space. Listing memberships with app authentication lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with User authentication lists memberships in spaces that the authenticated user has access to. Supports the following types of authentication: - App authentication with the authorization scope: - https://www.googleapis.com/auth/chat.bot - User authentication with one of the following authorization scopes: - https://www.googleapis.com/auth/chat.memberships.readonly - https://www.googleapis.com/auth/chat.memberships - https://www.googleapis.com/auth/chat.import (import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates, use_admin_access is true, and one of the following authorization scopes is used: - https://www.googleapis.com/auth/chat.admin.memberships.readonly - https://www.googleapis.com/auth/chat.admin.memberships

Declaration
public virtual SpacesResource.MembersResource.ListRequest List(string parent)
Parameters
Type Name Description
string parent

Required. The resource name of the space for which to fetch a membership list. Format: spaces/{space}

Returns
Type Description
SpacesResource.MembersResource.ListRequest

Patch(Membership, string)

Updates a membership. For an example, see Update a user's membership in a space. Supports the following types of authentication: - App authentication with administrator approval in Developer Preview and the authorization scope: - https://www.googleapis.com/auth/chat.app.memberships (only in spaces the app created) - User authentication with one of the following authorization scopes: - https://www.googleapis.com/auth/chat.memberships - https://www.googleapis.com/auth/chat.import (import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates, use_admin_access is true, and the following authorization scope is used: - https://www.googleapis.com/auth/chat.admin.memberships

Declaration
public virtual SpacesResource.MembersResource.PatchRequest Patch(Membership body, string name)
Parameters
Type Name Description
Membership body

The body of the request.

string name

Identifier. Resource name of the membership, assigned by the server. Format: spaces/{space}/members/{member}

Returns
Type Description
SpacesResource.MembersResource.PatchRequest
In this article
Back to top Generated by DocFX