import 'package:openapi/api.dart';
All URIs are relative to http://localhost:3000
Method | HTTP request | Description |
---|---|---|
forgotUser | POST /forgot | Forgot |
getUsers | GET /users | List Users Admin Only |
loginFacebookUser | POST /login-facebook | Login Facebook |
loginUser | POST /login | Login |
newPasswordUser | PUT /new-password | Create New Password |
putUsers | PUT /users | Sunting Role User Admin Only |
registerUser | POST /register | Register |
sendOtpUser | POST /send-otp | Kirim OTP |
RespondUserEmail forgotUser(requestUserEmail)
Forgot
Api untuk lupa password
import 'package:openapi/api.dart';
final api = Openapi().getUserApi();
final RequestUserEmail requestUserEmail = ; // RequestUserEmail |
try {
final response = api.forgotUser(requestUserEmail);
print(response);
} catch on DioError (e) {
print('Exception when calling UserApi->forgotUser: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
requestUserEmail | RequestUserEmail | [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]
RespondUsers getUsers(userCari)
List Users Admin Only
Ambil daftar users Admin Only
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().getUserApi();
final String userCari = userCari_example; // String |
try {
final response = api.getUsers(userCari);
print(response);
} catch on DioError (e) {
print('Exception when calling UserApi->getUsers: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
userCari | String | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RespondUserEmail loginFacebookUser(requestUserEmail)
Login Facebook
Api login email dan password user
import 'package:openapi/api.dart';
final api = Openapi().getUserApi();
final RequestUserEmail requestUserEmail = {"email":"email@gmail.com"}; // RequestUserEmail |
try {
final response = api.loginFacebookUser(requestUserEmail);
print(response);
} catch on DioError (e) {
print('Exception when calling UserApi->loginFacebookUser: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
requestUserEmail | RequestUserEmail | [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]
RespondUserEmail loginUser(requestUserEmailPassword)
Login
Api login email dan password user
import 'package:openapi/api.dart';
final api = Openapi().getUserApi();
final RequestUserEmailPassword requestUserEmailPassword = {"email":"email@gmail.com","password":"12345"}; // RequestUserEmailPassword |
try {
final response = api.loginUser(requestUserEmailPassword);
print(response);
} catch on DioError (e) {
print('Exception when calling UserApi->loginUser: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
requestUserEmailPassword | RequestUserEmailPassword | [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 newPasswordUser(requestUserPassword)
Create New Password
Create new password
import 'package:openapi/api.dart';
final api = Openapi().getUserApi();
final RequestUserPassword requestUserPassword = ; // RequestUserPassword |
try {
final response = api.newPasswordUser(requestUserPassword);
print(response);
} catch on DioError (e) {
print('Exception when calling UserApi->newPasswordUser: $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 putUsers(requestChangeRole)
Sunting Role User Admin Only
Sunting Role User Admin Only
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().getUserApi();
final RequestChangeRole requestChangeRole = {"user_id":"sdasdasdas-34-fdgdf-g","role":"admin"}; // RequestChangeRole |
try {
final response = api.putUsers(requestChangeRole);
print(response);
} catch on DioError (e) {
print('Exception when calling UserApi->putUsers: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
requestChangeRole | RequestChangeRole | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RespondGlobal registerUser(requestUserRegister)
Register
Api daftar user
import 'package:openapi/api.dart';
final api = Openapi().getUserApi();
final RequestUserRegister requestUserRegister = {"name":"Hasan","email":"email@gmail.com","handphone":"082213542319","password":"12345","password_confirm":"12345","city":"Bogor"}; // RequestUserRegister |
try {
final response = api.registerUser(requestUserRegister);
print(response);
} catch on DioError (e) {
print('Exception when calling UserApi->registerUser: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
requestUserRegister | RequestUserRegister | [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]
RespondUserEmail sendOtpUser(requestUserOtp)
Kirim OTP
Kirim otp ke server
import 'package:openapi/api.dart';
final api = Openapi().getUserApi();
final RequestUserOtp requestUserOtp = {"otp_code":"1235","userId":"23423sdfsdfsadfasdf"}; // RequestUserOtp | Kode otp
try {
final response = api.sendOtpUser(requestUserOtp);
print(response);
} catch on DioError (e) {
print('Exception when calling UserApi->sendOtpUser: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
requestUserOtp | RequestUserOtp | Kode otp | [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]