Documentation

Enumerates all the devices associated with a member.

Arguments

The Circle and Profile IDs.

Returns

Whether the action was successful and the requested list of Devices.

API Definition

public async Task<EnumDevicesReply> EnumDevices(EnumDevicesRequest request)

C# Structures

public class EnumDevicesRequest

{

  public string CircleId;

  public string ProfileId;

}

public class EnumDevicesReply

{

  public ReturnStatus Status;

  public List<DeviceInfo> Devices;

}

C# Example code:

public void EnumDevices(string circleId, string profileId)

{

   EnumDevicesRequest request = new EnumDevicesRequest() { CircleId = circleId, ProfileId = profileId};

   EnumDevicesReply reply = _circle.EnumDevices(request);

  if (reply.Status.Result)

   {

    foreach (DeviceInfo di in reply.Devices)

       {

      Console.WriteLine($"{di.DeviceId} - {di.DeviceName} - {di.Platform}");

       }

   }

  else

    Console.WriteLine(reply.Status.Message);

}