import 'package:social_app/core/api/api_client.dart'; import 'models/user_response.dart'; class UsersApi { final ApiClient _client; static const _prefix = '/api/v1/users'; UsersApi(this._client); Future getMe() async { final response = await _client.get('$_prefix/me'); return UserResponse.fromJson(response.data); } Future updateMe(UserUpdateRequest request) async { final response = await _client.patch('$_prefix/me', data: request.toJson()); return UserResponse.fromJson(response.data); } Future getByUsername(String username) async { final response = await _client.get('$_prefix/$username'); return UserResponse.fromJson(response.data); } }