me method
- List<
String> ? properties, - bool secureResource = true,
KO: 사용자 정보 가져오기
EN: Retrieve user information
Implementation
Future<User> me(
{List<String>? properties, bool secureResource = true}) async {
var params = {
Constants.propertyKeys:
properties != null ? jsonEncode(properties) : null,
Constants.secureResource: secureResource,
};
params.removeWhere((k, v) => v == null);
return ApiFactory.handleApiError(() async {
Response response =
await _dio.get(Constants.v2MePath, queryParameters: params);
final userResponse = UserResponse.fromJson(response.data);
return userResponse.toUser();
});
}