Skip to main content

SmartBuddies.GetAllSmartBuddiesAsync

Description

Gets the list of SmartBuddyInfo of all the available Smart Buddies from the connected Control Room.

Signature [C#]

Task<List<SmartBuddyInfo>> GetAllSmartBuddiesAsync()

Properties

Output

PropertyDescription
Task<List<SmartBuddyInfo>>Returns all available Smart Buddies information from the Control Room.

Remarks

Use GetAllSmartBuddiesAsync API to get the list of SmartBuddyInfo of all available Smart Buddies information from the connected Control Room.

Example

C#
public void GetAllSmartBuddies()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");

var smartBuddies = Task.Run(() => context.SmartBuddies.GetAllSmartBuddiesAsync()).Result;
foreach (SmartBuddyInfo smartBuddy in smartBuddies)
System.Console.WriteLine("SmartBuddy Name: " + smartBuddy.Name);
}
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;
}