Skip to content

Latest commit

 

History

History
161 lines (111 loc) · 4.69 KB

UserProfileApi.md

File metadata and controls

161 lines (111 loc) · 4.69 KB

openapi.api.UserProfileApi

Load the API package

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

getProfile

RespondGlobal getProfile(respondUser)

Get Profile

Amnil data profile user

Example

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');
}

Parameters

Name Type Description Notes
respondUser RespondUser [optional]

Return type

RespondGlobal

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

putPasswordUser

RespondGlobal putPasswordUser(requestUserPassword)

Create New Password

Change new password

Example

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');
}

Parameters

Name Type Description Notes
requestUserPassword RequestUserPassword [optional]

Return type

RespondGlobal

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

putProfile

RespondGlobal putProfile(userId, photo, email, name, city, handphone)

Edit Profile

Sunting profile user

Example

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');
}

Parameters

Name Type Description Notes
userId String
photo MultipartFile [optional]
email String [optional]
name String [optional]
city String [optional]
handphone String [optional]

Return type

RespondGlobal

Authorization

bearerAuth

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]