ExMicrosoftBot.Client.Conversations (ex_microsoftbot v3.0.0)

This module provides the functions for conversations

Link to this section Summary

Functions

Create a new Conversation.

Deletes an existing activity. The returned content will always be empty. @see API Reference

This function takes a conversation ID and a member ID and returns a ChannelAccount struct for that member of the conversation.

This function takes a ConversationId and returns an array of ChannelAccount[] objects which are the members of the conversation. @see API Reference.

This method allows you to reply to an activity. @see API Reference

This method allows you to reply to an activity. @see API Reference

This method allows you to send an activity to a conversation regardless of previous posts to a conversation.

This method allows you to send an activity to a conversation regardless of previous posts to a conversation.

Updates an existing activity. The activity struct is expected to have an ID. @see API Reference

This method allows you to upload an attachment directly into a channels blob storage.

Link to this section Functions

Link to this function

create_conversation(service_url, params)

Specs

Create a new Conversation.

@see API Reference

Link to this function

delete_activity(service_url, conversation_id, activity_id)

Specs

delete_activity(
  service_url :: String.t(),
  conversation_id :: String.t(),
  activity_or_id :: ExMicrosoftBot.Models.Activity.t() | String.t()
) :: {:ok, binary()} | ExMicrosoftBot.Client.error_type()

Deletes an existing activity. The returned content will always be empty. @see API Reference

Link to this function

get_member(service_url, conversation_id, member_id)

Specs

get_member(
  service_url :: String.t(),
  conversation_id :: String.t(),
  member_id :: String.t()
) ::
  {:ok, ExMicrosoftBot.Models.ChannelAccount.t()}
  | ExMicrosoftBot.Client.error_type()

This function takes a conversation ID and a member ID and returns a ChannelAccount struct for that member of the conversation.

@see API Reference.

Link to this function

get_members(service_url, conversation_id, activity_id \\ nil)

Specs

get_members(
  service_url :: String.t(),
  conversation_id :: String.t(),
  activity_id :: String.t() | nil
) ::
  {:ok, [ExMicrosoftBot.Models.ChannelAccount.t()]}
  | ExMicrosoftBot.Client.error_type()

This function takes a ConversationId and returns an array of ChannelAccount[] objects which are the members of the conversation. @see API Reference.

When ActivityId is passed in then it returns the members of the particular activity in the conversation.

@see API Reference

Link to this function

reply_to_activity(conversation_id, activity_id, activity)

Specs

reply_to_activity(
  conversation_id :: String.t(),
  activity_id :: String.t(),
  activity :: ExMicrosoftBot.Models.Activity.t()
) ::
  {:ok, ExMicrosoftBot.Models.ResourceResponse.t()}
  | ExMicrosoftBot.Client.error_type()

This method allows you to reply to an activity. @see API Reference

Link to this function

reply_to_activity(service_url, conversation_id, activity_id, activity)

Specs

reply_to_activity(
  service_url :: String.t(),
  conversation_id :: String.t(),
  activity_id :: String.t(),
  activity :: ExMicrosoftBot.Models.Activity.t()
) ::
  {:ok, ExMicrosoftBot.Models.ResourceResponse.t()}
  | ExMicrosoftBot.Client.error_type()

This method allows you to reply to an activity. @see API Reference

Link to this function

send_to_conversation(conversation_id, activity)

Specs

send_to_conversation(
  conversation_id :: String.t(),
  activity :: ExMicrosoftBot.Models.Activity.t()
) ::
  {:ok, ExMicrosoftBot.Models.ResourceResponse.t()}
  | ExMicrosoftBot.Client.error_type()

This method allows you to send an activity to a conversation regardless of previous posts to a conversation.

@see API Reference

Link to this function

send_to_conversation(service_url, conversation_id, activity)

Specs

send_to_conversation(
  service_url :: String.t(),
  conversation_id :: String.t(),
  activity :: ExMicrosoftBot.Models.Activity.t()
) ::
  {:ok, ExMicrosoftBot.Models.ResourceResponse.t()}
  | ExMicrosoftBot.Client.error_type()

This method allows you to send an activity to a conversation regardless of previous posts to a conversation.

@see API Reference

Link to this function

update_activity(service_url, conversation_id, activity)

Specs

update_activity(
  service_url :: String.t(),
  conversation_id :: String.t(),
  activity :: ExMicrosoftBot.Models.Activity.t()
) ::
  {:ok, ExMicrosoftBot.Models.ResourceResponse.t()}
  | ExMicrosoftBot.Client.error_type()

Updates an existing activity. The activity struct is expected to have an ID. @see API Reference

Link to this function

upload_attachment(service_url, conversation_id, attachment)

Specs

upload_attachment(
  service_url :: String.t(),
  conversation_id :: String.t(),
  attachment :: ExMicrosoftBot.Models.AttachmentData.t()
) ::
  {:ok, ExMicrosoftBot.Models.ResourceResponse.t()}
  | ExMicrosoftBot.Client.error_type()

This method allows you to upload an attachment directly into a channels blob storage.

@see API Reference