Bots.GetBotByNameAsync
Description
Gets the details about Assistant Buddy having the specified name
Signature [C#]
Task<BotInfo> GetBotByNameAsync (string botName, AppName appName)
Properties
Input
Property | Description |
---|---|
botName | Specify the Assistant Buddy's name to retrieve whose information. |
AppName | Specify the app name |
Output
Property | Description |
---|---|
BotInfo | Returns the information of the requested Assistant Buddy |
Remarks
Use GetBotByNameAsync API to return information about the Assistant Buddy's specified name.
Example
public void GetAssistantBuddyByName()
{
IControlRoomContext context = LoginControlRoom();
string botName = "IB-166";
BotInfo botInfo = Task.Run(() => context.Bots.GetBotByNameAsync(botName, AppName.AssistantBuddy)).Result;
Console.WriteLine("BotName: " + botInfo.BotName);
}
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;
}