3.0.0 • Published 5 years ago
@datafire/nexmo_conversation_v2 v3.0.0
@datafire/nexmo_conversation_v2
Client library for Conversation API
Installation and Usage
npm install --save @datafire/nexmo_conversation_v2
let nexmo_conversation_v2 = require('@datafire/nexmo_conversation_v2').create();
.then(data => {
console.log(data);
});
Description
The Conversation API enables you to build conversation features where communication can take place across multiple mediums including IP Messaging, PSTN Voice, SMS and WebRTC Audio and Video. The context of the conversations is maintained though each communication event taking place within a conversation, no matter the medium.
Actions
conversations.get
Please note that not all data is available in the list endpoint. Once you've identified the conversation you need to work with, use the GET /conversations/:id endpoint to fetch all of the conversation details
nexmo_conversation_v2.conversations.get({}, context)
Input
- input
object
- page_size
integer
: The number of results returned per page. The default value is10
. The maximum value is100
. - order
string
(values: asc, desc): Show the most (desc
) / least (asc
) recently created entries first - cursor
string
: The cursor to start returning results from. - date_start
string
: Search for conversations created after this ISO8601 date - date_end
string
: Search for conversations created before this ISO8601 date
- page_size
Output
- output
object
- _embedded
object
- data
object
- conversations
array
: List of conversations matching the provided filter- items conversation_list
- conversations
- data
- _links
object
- first
object
- href
string
- href
- next
object
- href
string
- href
- prev
object
- href
string
- href
- self
object
- href
string
- href
- first
- cursor
string
: Current cursor - page_size
integer
: The number of results returned on this page.
- _embedded
conversations.conversation_id.events.get
List Events
nexmo_conversation_v2.conversations.conversation_id.events.get({
"conversation_id": ""
}, context)
Input
- input
object
- conversation_id required
string
: The ID of the conversation - page_size
integer
: The number of results returned per page. The default value is10
. The maximum value is100
. - order
string
(values: asc, desc): Show the most (desc
) / least (asc
) recently created entries first - cursor
string
: The cursor to start returning results from. - start_id
string
: The ID to start returning events at - end_id
string
: The ID to end returning events at - event_type
string
: The type of event to search for. Does not currently support custom events
- conversation_id required
Output
- output
object
- _embedded
object
- data
object
- events
array
: List of events matching the provided filter- items all_events
- events
- data
- _links
object
- first
object
- href
string
- href
- next
object
- href
string
- href
- prev
object
- href
string
- href
- self
object
- href
string
- href
- first
- page_size
integer
: The number of results returned on this page.
- _embedded
conversations.conversation_id.members.get
List Members
nexmo_conversation_v2.conversations.conversation_id.members.get({
"conversation_id": ""
}, context)
Input
- input
object
- conversation_id required
string
: The ID of the conversation - page_size
integer
: The number of results returned per page. The default value is10
. The maximum value is100
. - order
string
(values: asc, desc): Show the most (desc
) / least (asc
) recently created entries first - cursor
string
: The cursor to start returning results from.
- conversation_id required
Output
- output
object
- _embedded
object
- data
object
- members
array
: List of members matching the provided filter- items member_list
- members
- data
- _links
object
- first
object
- href
string
- href
- next
object
- href
string
- href
- prev
object
- href
string
- href
- self
object
- href
string
- href
- first
- page_size
integer
: The number of results returned on this page
- _embedded
users.get
List Users
nexmo_conversation_v2.users.get({}, context)
Input
- input
object
- page_size
integer
: The number of results returned per page. The default value is10
. The maximum value is100
. - order
string
(values: asc, desc): Show the most (desc
) / least (asc
) recently created entries first - cursor
string
: The cursor to start returning results from.
- page_size
Output
- output
object
- _embedded
object
- data
object
- users
array
: List of users matching the provided filter- items user_list
- users
- data
- _links
object
- first
object
- href
string
- href
- next
object
- href
string
- href
- prev
object
- href
string
- href
- self
object
- href
string
- href
- first
- cursor
string
: Current cursor - page_size
integer
: The number of results returned on this page
- _embedded
Definitions
all_events
conversation_display_name
- conversation_display_name
string
: The public facing name of the conversation
conversation_id
- conversation_id
string
: Automatically generated conversation ID
conversation_image_url
- conversation_image_url
string
: An image URL that you associate with the conversation
conversation_list
- conversation_list
object
- _links
object
- self
object
- href
string
- href
- self
- display_name conversation_display_name
- id
string
: The ID of the conversation - image_url conversation_image_url
- name conversation_name
- timestamp
object
- created
string
: The time that the conversation was created
- created
- _links
conversation_name
- conversation_name
string
: Your internal conversation name. Must be unique
custom_event
- custom_event
- body
object
: The body of yourcustom
event - type
string
: The event type (custom:<YOUR_IDENTIFIER>
) - _links
object
- self
object
- href
string
- href
- self
- from
string
: The member ID of the sender - id
integer
: The ID of the event - timestamp
string
: The time that the event happened
- body
event
- event
object
- _links
object
- self
object
- href
string
- href
- self
- from
string
: The member ID of the sender - id
integer
: The ID of the event - timestamp
string
: The time that the event happened
- _links
member
- member
- _links
object
- self
object
- href
string
- href
- self
- display_name
string
: The display name of the User - id
string
: Member ID - name
string
: The name of the User - state
string
(values: INVITED, JOINED): The state that the member is in for this conversation - user_id
string
: The ID of the User - channel
object
- type
string
(values: app): The channel that the member joins with
- type
- initiator
object
- invited
object
- is_system
boolean
- is_system
- joined
object
- is_system
boolean
- is_system
- invited
- media
object
: The current media state for the member- audio_settings
object
: The current audio state for the member- earmuffed
boolean
: Can the member hear other participants? - enabled
boolean
: Is audio enabled? - muted
boolean
: Can the member speak to other participants?
- earmuffed
- audio_settings
- timestamp
object
- invited
string
: The time that an invitation was sent - joined
string
: The time that the conversation was joined - left
string
: The time that the member left the conversation
- invited
- _links
member_invited_event
- member_invited_event
- type
string
: The event type (member:invited
) - _links
object
- self
object
- href
string
- href
- self
- from
string
: The member ID of the sender - id
integer
: The ID of the event - timestamp
string
: The time that the event happened - body member
- type
member_left_event
- member_left_event
- type
string
: The event type (member:left
) - _links
object
- self
object
- href
string
- href
- self
- from
string
: The member ID of the sender - id
integer
: The ID of the event - timestamp
string
: The time that the event happened - body member
- type
member_list
- member_list
object
- _links
object
- self
object
- href
string
- href
- self
- display_name
string
: The display name of the User - id
string
: Member ID - name
string
: The name of the User - state
string
(values: INVITED, JOINED): The state that the member is in for this conversation - user_id
string
: The ID of the User
- _links
text_event
- text_event
- body
object
: The body of thetext
event- text
string
: The text sent in this event
- text
- conversation_id
string
: The ID of the Conversation that the member belongs to - type
string
: The event type (text
) - _links
object
- self
object
- href
string
- href
- self
- from
string
: The member ID of the sender - id
integer
: The ID of the event - timestamp
string
: The time that the event happened
- body
user_id
- user_id
string
: The ID of the user
user_links
- user_links
object
- self
object
- href
string
- href
- self
user_list
- user_list
object
- _links user_links
- id user_id
- name user_name
user_name
- user_name
string
: The name of the user
3.0.0
5 years ago