Skip to content

Latest commit

 

History

History
99 lines (70 loc) · 2.44 KB

AppForestVPNAPI.md

File metadata and controls

99 lines (70 loc) · 2.44 KB

AppForestVPNAPI

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

getCurrentUserDevice

UserDevice getCurrentUserDevice()

Get user device info

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = AppForestVPNAPI()
try {
    val result : UserDevice = apiInstance.getCurrentUserDevice()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AppForestVPNAPI#getCurrentUserDevice")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AppForestVPNAPI#getCurrentUserDevice")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

UserDevice

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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

updateCurrentUserDevice

updateCurrentUserDevice(updateUserDeviceRequest)

Update user device

Example

// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*

val apiInstance = AppForestVPNAPI()
val updateUserDeviceRequest : UpdateUserDeviceRequest =  // UpdateUserDeviceRequest | 
try {
    apiInstance.updateCurrentUserDevice(updateUserDeviceRequest)
} catch (e: ClientException) {
    println("4xx response calling AppForestVPNAPI#updateCurrentUserDevice")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AppForestVPNAPI#updateCurrentUserDevice")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
updateUserDeviceRequest UpdateUserDeviceRequest

Return type

null (empty response body)

Authorization

Configure bearerAuth: ApiClient.accessToken = ""

HTTP request headers

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