Skip to main content
Version: IB7.0

Bots.GetBotByNameAsync

Description​

Gets the details about Assistant Buddy having the specified name

Signature [C#]​

Task<BotInfo> GetBotByNameAsync (string botName, AppName appName)

Properties​

Input​

PropertyDescription
botNameSpecify the Assistant Buddy's name to retrieve whose information.
AppNameSpecify the app name

Output​

PropertyDescription
BotInfoReturns 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;
}