Class: Nexmo::Conversations::Members

Inherits:
Namespace
  • Object
show all
Defined in:
lib/nexmo/conversations/members.rb

Instance Method Summary collapse

Instance Method Details

#create(conversation_id, params) ⇒ Response

Create a member.

Parameters:

  • conversation_id (String)
  • params (Hash)

Options Hash (params):

  • :action (String)

    Invite or join a member to a conversation. Must be one of: `invite` or `join`.

  • :user_id (required, String)

    User ID.

  • :member_id (String)

    Member ID.

  • :channel (required, Hash)

    A user who joins a conversation as a member can have one channel per membership type.

  • :media (Hash)

    Media Object.

  • :knocking_id (String)

    Knocker ID. A knocker is a pre-member of a conversation who does not exist yet.

  • :member_id_inviting (String)

    Member ID of the member that sends the invitation.

Returns:

See Also:


41
42
43
# File 'lib/nexmo/conversations/members.rb', line 41

def create(conversation_id, params)
  request('/beta/conversations/' + conversation_id + '/members', params: params, type: Post)
end

#delete(conversation_id, member_id) ⇒ Response

Delete a member.

Parameters:

  • conversation_id (String)
  • member_id (String)

Returns:

See Also:


99
100
101
# File 'lib/nexmo/conversations/members.rb', line 99

def delete(conversation_id, member_id)
  request('/beta/conversations/' + conversation_id + '/members/' + member_id, type: Delete)
end

#get(conversation_id, member_id) ⇒ Response

Retrieve a member.

Parameters:

  • conversation_id (String)
  • member_id (String)

Returns:

See Also:


66
67
68
# File 'lib/nexmo/conversations/members.rb', line 66

def get(conversation_id, member_id)
  request('/beta/conversations/' + conversation_id + '/members/' + member_id)
end

#list(conversation_id) ⇒ Response

List members.

Parameters:

  • conversation_id (String)

Returns:

See Also:


53
54
55
# File 'lib/nexmo/conversations/members.rb', line 53

def list(conversation_id)
  request('/beta/conversations/' + conversation_id + '/members')
end

#update(conversation_id, member_id, params) ⇒ Response

Update a member.

Parameters:

  • conversation_id (String)
  • member_id (String)
  • params (Hash)

Options Hash (params):

  • :action (String)

    Invite or join a member to a conversation.

  • :channel (Hash)

    A user who joins a conversation as a member can have one channel per membership type.

Returns:

See Also:


86
87
88
# File 'lib/nexmo/conversations/members.rb', line 86

def update(conversation_id, member_id, params)
  request('/beta/conversations/' + conversation_id + '/members/' + member_id, params: params, type: Put)
end