import 'package:forestvpn_api/api.dart';
All URIs are relative to https://api.forestvpn.com/v2
Method | HTTP request | Description |
---|---|---|
getCurrentUserDevice | GET /app/devices/current/ | Get user device info |
updateCurrentUserDevice | PATCH /app/devices/current/ | Update user device |
UserDevice getCurrentUserDevice()
Get user device info
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getAppApi();
try {
final response = api.getCurrentUserDevice();
print(response);
} catch on DioError (e) {
print('Exception when calling AppApi->getCurrentUserDevice: $e\n');
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateCurrentUserDevice(updateUserDeviceRequest)
Update user device
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getAppApi();
final UpdateUserDeviceRequest updateUserDeviceRequest = ; // UpdateUserDeviceRequest |
try {
api.updateCurrentUserDevice(updateUserDeviceRequest);
} catch on DioError (e) {
print('Exception when calling AppApi->updateCurrentUserDevice: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
updateUserDeviceRequest | UpdateUserDeviceRequest |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]