SkillHttpClient class
A BotFrameworkHttpClient specialized for Skills that encapsulates Conversation ID generation.
- Extends
Constructors
Skill |
Creates a new instance of the SkillHttpClient class. |
Methods
post |
Uses the SkillConversationIdFactory to create or retrieve a Skill Conversation Id, and sends the activity. |
post |
Uses the SkillConversationIdFactory to create or retrieve a Skill Conversation Id, and sends the activity. |
Inherited Methods
post |
Forwards an activity to another bot. |
Constructor Details
SkillHttpClient(ICredentialProvider, SkillConversationIdFactoryBase, string)
Creates a new instance of the SkillHttpClient class.
new SkillHttpClient(credentialProvider: ICredentialProvider, conversationIdFactory: SkillConversationIdFactoryBase, channelService?: string)
Parameters
- credentialProvider
-
ICredentialProvider
An instance of ICredentialProvider.
- conversationIdFactory
-
SkillConversationIdFactoryBase
An instance of a class derived from SkillConversationIdFactoryBase.
- channelService
-
string
Optional. The channel service.
Method Details
postToSkill(string, BotFrameworkSkill, string, Activity)
Warning
This API is now deprecated.
This overload is deprecated. Please use SkillHttpClient.postToSkill() that takes an originatingAudience
.
Uses the SkillConversationIdFactory to create or retrieve a Skill Conversation Id, and sends the activity.
function postToSkill(fromBotId: string, toSkill: BotFrameworkSkill, callbackUrl: string, activity: Activity): Promise<InvokeResponse>
Parameters
- fromBotId
-
string
The MicrosoftAppId of the bot sending the activity.
- toSkill
-
BotFrameworkSkill
The skill to create the Conversation Id for.
- callbackUrl
-
string
The callback Url for the skill host.
- activity
-
Activity
The activity to send.
Returns
Promise<InvokeResponse>
postToSkill<T>(string, string, BotFrameworkSkill, string, Activity)
Uses the SkillConversationIdFactory to create or retrieve a Skill Conversation Id, and sends the activity.
function postToSkill<T>(originatingAudience: string, fromBotId: string, toSkill: BotFrameworkSkill, callbackUrl: string, activity: Activity): Promise<InvokeResponse<T>>
Parameters
- originatingAudience
-
string
The OAuth audience scope, used during token retrieval. (Either https://api.botframework.com or bot app id.)
- fromBotId
-
string
The MicrosoftAppId of the bot sending the activity.
- toSkill
-
BotFrameworkSkill
The skill to create the Conversation Id for.
- callbackUrl
-
string
The callback Url for the skill host.
- activity
-
Activity
The activity to send.
Returns
Promise<InvokeResponse<T>>
Inherited Method Details
postActivity<T>(string, string, string, string, string, Activity)
Forwards an activity to another bot.
function postActivity<T>(fromBotId: string, toBotId: string, toUrl: string, serviceUrl: string, conversationId: string, activity: Activity): Promise<InvokeResponse<T>>
Parameters
- fromBotId
-
string
The MicrosoftAppId of the bot sending the activity.
- toBotId
-
string
The MicrosoftAppId of the bot receiving the activity.
- toUrl
-
string
The URL of the bot receiving the activity.
- serviceUrl
-
string
The callback Url for the skill host.
- conversationId
-
string
A conversation ID to use for the conversation with the skill.
- activity
-
Activity
Activity to forward.
Returns
Promise<InvokeResponse<T>>
A promise representing the asynchronous operation.
Inherited From BotFrameworkHttpClient.postActivity