Beispiel #1
0
        static void Main1(string[] args)
        {
            const string ak        = "{your ak string}";
            const string sk        = "{your sk string}";
            const string endpoint  = "{your endpoint string}";
            const string projectId = "{your projectID string}";

            var config = HttpConfig.GetDefaultConfig();

            config.IgnoreSslVerification = true;
            var auth        = new BasicCredentials(ak, sk, projectId);
            var iotdaClient = IoTDAClient.NewBuilder()
                              .WithCredential(auth)
                              .WithEndPoint(endpoint)
                              .WithHttpConfig(config).Build();

            createCommand(iotdaClient);
        }
Beispiel #2
0
        static void Main1(string[] args)
        {
            const string ak        = "{your ak string}";
            const string sk        = "{your sk string}";
            const string endpoint  = "{your endpoint string}";
            const string projectId = "{your projectID string}";

            var config = HttpConfig.GetDefaultConfig();

            config.IgnoreSslVerification = true;
            var auth        = new BasicCredentials(ak, sk, projectId);
            var iotdaClient = IoTDAClient.NewBuilder()
                              .WithCredential(auth)
                              .WithEndPoint(endpoint)
                              .WithHttpConfig(config).Build();

            QueryDeviceGroup(iotdaClient);
            QueryDeviceGroupList(iotdaClient);
            addDeviceGroup(iotdaClient);
            updateDeviceGroup(iotdaClient);
            deleteDeviceGroup(iotdaClient);
            manageDevicesInGroup(iotdaClient);
            queryDevicesInGroup(iotdaClient);
        }