@@ -520,6 +520,99 @@ def get_fieldconfig(self, type, **kwargs):
520520 callback = params .get ('callback' ))
521521 return response
522522
523+ def get_profiles_users (self , ** kwargs ):
524+ """
525+ Get a user profile listing
526+
527+
528+ This method makes a synchronous HTTP request by default. To make an
529+ asynchronous HTTP request, please define a `callback` function
530+ to be invoked when receiving the response.
531+ >>> def callback_function(response):
532+ >>> pprint(response)
533+ >>>
534+ >>> thread = api.get_profiles_users(callback=callback_function)
535+
536+ :param callback function: The callback function
537+ for asynchronous request. (optional)
538+ :param int page_size: Page size
539+ :param int page_number: Page number
540+ :param list[str] id: id
541+ :param list[str] jid: jid
542+ :param str sort_order: Ascending or descending sort order
543+ :param list[str] expand: Which fields, if any, to expand
544+ :param str state: Only list users of this state
545+ :return: UserProfileEntityListing
546+ If the method is called asynchronously,
547+ returns the request thread.
548+ """
549+
550+ all_params = ['page_size' , 'page_number' , 'id' , 'jid' , 'sort_order' , 'expand' , 'state' ]
551+ all_params .append ('callback' )
552+
553+ params = locals ()
554+ for key , val in iteritems (params ['kwargs' ]):
555+ if key not in all_params :
556+ raise TypeError (
557+ "Got an unexpected keyword argument '%s'"
558+ " to method get_profiles_users" % key
559+ )
560+ params [key ] = val
561+ del params ['kwargs' ]
562+
563+
564+
565+ resource_path = '/api/v2/profiles/users' .replace ('{format}' , 'json' )
566+ path_params = {}
567+
568+ query_params = {}
569+ if 'page_size' in params :
570+ query_params ['pageSize' ] = params ['page_size' ]
571+ if 'page_number' in params :
572+ query_params ['pageNumber' ] = params ['page_number' ]
573+ if 'id' in params :
574+ query_params ['id' ] = params ['id' ]
575+ if 'jid' in params :
576+ query_params ['jid' ] = params ['jid' ]
577+ if 'sort_order' in params :
578+ query_params ['sortOrder' ] = params ['sort_order' ]
579+ if 'expand' in params :
580+ query_params ['expand' ] = params ['expand' ]
581+ if 'state' in params :
582+ query_params ['state' ] = params ['state' ]
583+
584+ header_params = {}
585+
586+ form_params = []
587+ local_var_files = {}
588+
589+ body_params = None
590+
591+ # HTTP header `Accept`
592+ header_params ['Accept' ] = self .api_client .\
593+ select_header_accept (['application/json' ])
594+ if not header_params ['Accept' ]:
595+ del header_params ['Accept' ]
596+
597+ # HTTP header `Content-Type`
598+ header_params ['Content-Type' ] = self .api_client .\
599+ select_header_content_type (['application/json' ])
600+
601+ # Authentication setting
602+ auth_settings = ['PureCloud Auth' ]
603+
604+ response = self .api_client .call_api (resource_path , 'GET' ,
605+ path_params ,
606+ query_params ,
607+ header_params ,
608+ body = body_params ,
609+ post_params = form_params ,
610+ files = local_var_files ,
611+ response_type = 'UserProfileEntityListing' ,
612+ auth_settings = auth_settings ,
613+ callback = params .get ('callback' ))
614+ return response
615+
523616 def get_user (self , user_id , ** kwargs ):
524617 """
525618 Get user.
@@ -1096,6 +1189,87 @@ def get_user_outofoffice(self, user_id, **kwargs):
10961189 callback = params .get ('callback' ))
10971190 return response
10981191
1192+ def get_user_profile (self , user_id , ** kwargs ):
1193+ """
1194+ Get user profile
1195+
1196+
1197+ This method makes a synchronous HTTP request by default. To make an
1198+ asynchronous HTTP request, please define a `callback` function
1199+ to be invoked when receiving the response.
1200+ >>> def callback_function(response):
1201+ >>> pprint(response)
1202+ >>>
1203+ >>> thread = api.get_user_profile(user_id, callback=callback_function)
1204+
1205+ :param callback function: The callback function
1206+ for asynchronous request. (optional)
1207+ :param str user_id: userId (required)
1208+ :param list[str] expand: Which fields, if any, to expand
1209+ :return: UserProfile
1210+ If the method is called asynchronously,
1211+ returns the request thread.
1212+ """
1213+
1214+ all_params = ['user_id' , 'expand' ]
1215+ all_params .append ('callback' )
1216+
1217+ params = locals ()
1218+ for key , val in iteritems (params ['kwargs' ]):
1219+ if key not in all_params :
1220+ raise TypeError (
1221+ "Got an unexpected keyword argument '%s'"
1222+ " to method get_user_profile" % key
1223+ )
1224+ params [key ] = val
1225+ del params ['kwargs' ]
1226+
1227+ # verify the required parameter 'user_id' is set
1228+ if ('user_id' not in params ) or (params ['user_id' ] is None ):
1229+ raise ValueError ("Missing the required parameter `user_id` when calling `get_user_profile`" )
1230+
1231+
1232+ resource_path = '/api/v2/users/{userId}/profile' .replace ('{format}' , 'json' )
1233+ path_params = {}
1234+ if 'user_id' in params :
1235+ path_params ['userId' ] = params ['user_id' ]
1236+
1237+ query_params = {}
1238+ if 'expand' in params :
1239+ query_params ['expand' ] = params ['expand' ]
1240+
1241+ header_params = {}
1242+
1243+ form_params = []
1244+ local_var_files = {}
1245+
1246+ body_params = None
1247+
1248+ # HTTP header `Accept`
1249+ header_params ['Accept' ] = self .api_client .\
1250+ select_header_accept (['application/json' ])
1251+ if not header_params ['Accept' ]:
1252+ del header_params ['Accept' ]
1253+
1254+ # HTTP header `Content-Type`
1255+ header_params ['Content-Type' ] = self .api_client .\
1256+ select_header_content_type (['application/json' ])
1257+
1258+ # Authentication setting
1259+ auth_settings = ['PureCloud Auth' ]
1260+
1261+ response = self .api_client .call_api (resource_path , 'GET' ,
1262+ path_params ,
1263+ query_params ,
1264+ header_params ,
1265+ body = body_params ,
1266+ post_params = form_params ,
1267+ files = local_var_files ,
1268+ response_type = 'UserProfile' ,
1269+ auth_settings = auth_settings ,
1270+ callback = params .get ('callback' ))
1271+ return response
1272+
10991273 def get_user_profileskills (self , user_id , ** kwargs ):
11001274 """
11011275 List profile skills for a user
0 commit comments