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(ctx).Execute()
Get user device info
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AppApi.GetCurrentUserDevice(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AppApi.GetCurrentUserDevice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCurrentUserDevice`: UserDevice
fmt.Fprintf(os.Stdout, "Response from `AppApi.GetCurrentUserDevice`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetCurrentUserDeviceRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateCurrentUserDevice(ctx).UpdateUserDeviceRequest(updateUserDeviceRequest).Execute()
Update user device
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
updateUserDeviceRequest := *openapiclient.NewUpdateUserDeviceRequest() // UpdateUserDeviceRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AppApi.UpdateCurrentUserDevice(context.Background()).UpdateUserDeviceRequest(updateUserDeviceRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AppApi.UpdateCurrentUserDevice``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiUpdateCurrentUserDeviceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
updateUserDeviceRequest | UpdateUserDeviceRequest |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]