All URIs are relative to https://api.forestvpn.com/v2
Method | HTTP request | Description |
---|---|---|
AcceptFriendshipInvitation | Patch /friendship/invitations/{code}/ | Accept friendship invitation |
CreateFriendshipInvitation | Post /friendship/invitations/ | Create friendship invitation |
DeleteFriend | Delete /friendship/friends/{id}/ | Delete friend |
GetFriend | Get /friendship/friends/{id}/ | Friend details |
GetFriendshipInvitation | Get /friendship/invitations/{code}/ | Friendship invitation details |
ListFriends | Get /friendship/friends/ | Get friends list |
RejectFriendshipInvitation | Delete /friendship/invitations/{code}/ | Reject friendship invitation |
AcceptFriendshipInvitation(ctx, code).Execute()
Accept friendship invitation
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
code := "code_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FriendshipApi.AcceptFriendshipInvitation(context.Background(), code).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FriendshipApi.AcceptFriendshipInvitation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
code | string |
Other parameters are passed through a pointer to a apiAcceptFriendshipInvitationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FriendshipInvitation CreateFriendshipInvitation(ctx).PerPage(perPage).Page(page).Execute()
Create friendship invitation
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
perPage := int32(56) // int32 | (optional)
page := int32(56) // int32 | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FriendshipApi.CreateFriendshipInvitation(context.Background()).PerPage(perPage).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FriendshipApi.CreateFriendshipInvitation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateFriendshipInvitation`: FriendshipInvitation
fmt.Fprintf(os.Stdout, "Response from `FriendshipApi.CreateFriendshipInvitation`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateFriendshipInvitationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
perPage | int32 | ||
page | int32 |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteFriend(ctx, id).Execute()
Delete friend
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FriendshipApi.DeleteFriend(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FriendshipApi.DeleteFriend``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiDeleteFriendRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Friendship GetFriend(ctx, id).Execute()
Friend details
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FriendshipApi.GetFriend(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FriendshipApi.GetFriend``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetFriend`: Friendship
fmt.Fprintf(os.Stdout, "Response from `FriendshipApi.GetFriend`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiGetFriendRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FriendshipInvitation GetFriendshipInvitation(ctx, code).Execute()
Friendship invitation details
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
code := "code_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FriendshipApi.GetFriendshipInvitation(context.Background(), code).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FriendshipApi.GetFriendshipInvitation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetFriendshipInvitation`: FriendshipInvitation
fmt.Fprintf(os.Stdout, "Response from `FriendshipApi.GetFriendshipInvitation`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
code | string |
Other parameters are passed through a pointer to a apiGetFriendshipInvitationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Friendship ListFriends(ctx).PerPage(perPage).Page(page).Execute()
Get friends list
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
perPage := int32(56) // int32 | (optional)
page := int32(56) // int32 | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FriendshipApi.ListFriends(context.Background()).PerPage(perPage).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FriendshipApi.ListFriends``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListFriends`: []Friendship
fmt.Fprintf(os.Stdout, "Response from `FriendshipApi.ListFriends`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListFriendsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
perPage | int32 | ||
page | int32 |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RejectFriendshipInvitation(ctx, code).Execute()
Reject friendship invitation
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
code := "code_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FriendshipApi.RejectFriendshipInvitation(context.Background(), code).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FriendshipApi.RejectFriendshipInvitation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
code | string |
Other parameters are passed through a pointer to a apiRejectFriendshipInvitationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]