Bots.UpdateBotAsync
Description
Update the details about the specified Assistant Buddy.
Signature [C#]
Task UpdateBotAsync(BotInfo botInfo)
Properties
Input
Property | Description |
---|---|
BotInfo | Specify the details of the Assistant Buddy |
Remarks
Use UpdateBotAsync API to update information about the Assistant Buddy.
Example
public void UpdateAssistantBuddy()
{
IControlRoomContext context = LoginControlRoom();
string updateBotName = "updateBot";
BotInfo botInfo = new BotInfo()
{
BotId = 1,
RegAppsId = Task.Run(() => context.Bots.GetBotByIdAsync(botId)).Result.RegAppsId,
BotName = updateBotName,
ExecStatusId = 1,
BotGuid = Task.Run(() => context.Bots.GetBotByIdAsync(botId)).Result.BotGuid
};
Task.Run(() => context.Bots.UpdateBotAsync(botInfo)).Wait();
}
C#
public IControlRoomContext LoginControlRoom()
{
IControlRoomContext context;
string connectionString;
connectionString = "ServerUrl=https://demo.onnitellibuddies.com;UserName=demoadmin;Password=password";
context = new ControlRoomContext(connectionString);
context.Open();
return context;
}