associateDevicesToUserWithHttpInfo method
Associates one or more devices to the given user
Associates a list of iots to the given user if the security requirements are fulfilled
Note: This method returns the HTTP Response.
Parameters:
-
String userId (required): User ID
-
List<String> deviceTokens (required): List of IoT ids
Implementation
Future<Response> associateDevicesToUserWithHttpInfo(
String userId,
List<String> deviceTokens,
) async {
// ignore: prefer_const_declarations
final path =
r'/relationships/user/{userId}/iots'.replaceAll('{userId}', userId);
// ignore: prefer_final_locals
Object? postBody = deviceTokens;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}