import 'package:openapi/api.dart';
All URIs are relative to http://localhost:3000
Method | HTTP request | Description |
---|---|---|
getProfile | GET /profile | Get Profile |
putPasswordUser | PUT /change-password | Create New Password |
putProfile | PUT /profile | Edit Profile |
RespondGlobal getProfile(respondUser)
Get Profile
Amnil data profile user
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = Openapi().getUserProfileApi();
final RespondUser respondUser = {"success":true,"message":"Password berhasil diubah, silahkan login","data":{"userId":"67fgh-gfh354gfh","name":"Hasan","email":"email@gmail.com","handphone":82213542319,"city":"Bogor","photo":"84576kjldfgh24/fghkjdffgh.jpg"}}; // RespondUser |
try {
final response = api.getProfile(respondUser);
print(response);
} catch on DioError (e) {
print('Exception when calling UserProfileApi->getProfile: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
respondUser | RespondUser | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RespondGlobal putPasswordUser(requestUserPassword)
Create New Password
Change new password
import 'package:openapi/api.dart';
final api = Openapi().getUserProfileApi();
final RequestUserPassword requestUserPassword = ; // RequestUserPassword |
try {
final response = api.putPasswordUser(requestUserPassword);
print(response);
} catch on DioError (e) {
print('Exception when calling UserProfileApi->putPasswordUser: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
requestUserPassword | RequestUserPassword | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RespondGlobal putProfile(userId, photo, email, name, city, handphone)
Edit Profile
Sunting profile user
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = Openapi().getUserProfileApi();
final String userId = userId_example; // String |
final MultipartFile photo = BINARY_DATA_HERE; // MultipartFile |
final String email = email_example; // String |
final String name = name_example; // String |
final String city = city_example; // String |
final String handphone = handphone_example; // String |
try {
final response = api.putProfile(userId, photo, email, name, city, handphone);
print(response);
} catch on DioError (e) {
print('Exception when calling UserProfileApi->putProfile: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
userId | String | ||
photo | MultipartFile | [optional] | |
String | [optional] | ||
name | String | [optional] | |
city | String | [optional] | |
handphone | String | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]