/// <summary> /// Wrapper around the UniFi API that provides an object tree view of the UniFi managed network /// </summary> /// <param name="api">UniFi API</param> public UniFiOrchestrator(UniFiApi api) { API = api; Clients = new ClientNetworkedDeviceCollection(API); InfrastructureDevices = new InfrastructureNetworkedDeviceCollection(API); WlanGroups = new WlanGroupCollection(API); UserGroups = new UserGroupCollection(API); PortForwards = new PortForwardCollection(API); }
public static IClientNetworkedDevice CreateFromJson(UniFiApi api, JsonClient client) { if (client.is_wired) { return(new WiredClientNetworkedDevice(api, client)); } else { return(new WirelessClientNetworkedDevice(api, client)); } }
public NetworkDeploymentSite(UniFiApi api) { API = api; Clients = new ClientDeviceCollection(api); Devices = new PhysicalNetworkDeviceCollection(api); PortForwards = new PortForwardCollection(api); WirelessNetworks = new WirelessNetworkCollection(api); WirelessNetworkGroups = new WlanGroupCollection(api); UserGroups = new UserGroupCollection(api); }
public static IInfrastructureNetworkedDevice CreateFromJson(UniFiApi api, JsonNetworkDevice device) { switch (device.type) { case "uap": return(new AccessPointInfrastructureNetworkedDevice(api, device)); case "usw": return(new SwitchInfrastructureNetworkedDevice(api, device)); case "ugw": return(new RouterInfrastructureNetworkedDevice(api, device)); default: return(new UnknownInfrastructureNetworkedDevice(api, device)); } }
public WiredClientNetworkedDevice(UniFiApi api, JsonClient json) : base(api, json) { }
protected IUniFiNetworkDevice(UniFiApi api, string macAddress) { _api = api; MacAddress = macAddress; }
protected IUniFiNetworkDevice(UniFiApi api, NetworkDevice deviceData) : this(api, deviceData.mac) { State = deviceData; }
public UnifiClient(string username, string password, Uri uri) { // Create a new Api instance to connect with the UniFi Controller _uniFiApi = new UniFiApi(uri, username, password); }
internal InfrastructureNetworkedDeviceCollection(UniFiApi api) : base(api) { }
internal ClientNetworkedDeviceCollection(UniFiApi api) : base(api) { }
internal PortForwardCollection(UniFiApi api) : base(api) { }
public AccessPointNetworkDevice(UniFiApi api, NetworkDevice deviceData) : base(api, deviceData) { }
public UnknownInfrastructureNetworkedDevice(UniFiApi api, JsonNetworkDevice json) : base(api, json) { }
public RoutingNetworkDevice(UniFiApi api, string macAddress) : base(api, macAddress) { PortForwards = new PortForwardCollection(api); }
public RoutingNetworkDevice(UniFiApi api, NetworkDevice deviceData) : base(api, deviceData) { PortForwards = new PortForwardCollection(api); }
/// <summary> /// Create a data collection that uses a UniFiApi object to retrieve its underlying objects /// </summary> /// <param name="api">API object for this collection's data connection</param> protected RemotedDataCollection(UniFiApi api) { API = api; CachedCollection = new List <T>(); }
public PortForwardCollection(UniFiApi api) : base(api) { }
public INetworkDevice(UniFiApi api) : this() { _api = api; }
public ClientDeviceCollection(UniFiApi api) : base(api) { }
public UnifiClient(UniFiApi innerClient, IOptions <UnifiClientOptions> options) { this.options = options; this.innerClient = innerClient; }
public ClientDevice(UniFiApi api, Client clientData) : base(api) { State = clientData; }
public PhysicalNetworkDeviceCollection(UniFiApi api) : base(api) { }
public AccessPointNetworkDevice(UniFiApi api, string macAddress) : base(api, macAddress) { }
protected IInfrastructureNetworkedDevice(UniFiApi api, JsonNetworkDevice json) : base(api) { Json = json; Clients = new List <IClientNetworkedDevice>(); InfrastructureDevices = new List <IInfrastructureNetworkedDevice>(); }
protected IClientNetworkedDevice(UniFiApi api, JsonClient json) : base(api) { Json = json; }
public WirelessNetworkCollection(UniFiApi api) : base(api) { }
internal WlanGroupCollection(UniFiApi api) : base(api) { }
internal AccessPointInfrastructureNetworkedDevice(UniFiApi api, JsonNetworkDevice json) : base(api, json) { }
internal UserGroupCollection(UniFiApi api) : base(api) { }
public SwitchingNetworkDevice(UniFiApi api, NetworkDevice deviceData) : base(api, deviceData) { }