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 |
open class func acceptFriendshipInvitation(code: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
Accept friendship invitation
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ForestVPNAPI
let code = "code_example" // String |
// Accept friendship invitation
FriendshipAPI.acceptFriendshipInvitation(code: code) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
code | String |
Void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func createFriendshipInvitation(perPage: Double? = nil, page: Double? = nil, completion: @escaping (_ data: FriendshipInvitation?, _ error: Error?) -> Void)
Create friendship invitation
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ForestVPNAPI
let perPage = 987 // Double | (optional)
let page = 987 // Double | (optional)
// Create friendship invitation
FriendshipAPI.createFriendshipInvitation(perPage: perPage, page: page) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
perPage | Double | [optional] | |
page | Double | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func deleteFriend(id: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
Delete friend
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ForestVPNAPI
let id = 987 // UUID |
// Delete friend
FriendshipAPI.deleteFriend(id: id) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID |
Void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func getFriend(id: UUID, completion: @escaping (_ data: Friendship?, _ error: Error?) -> Void)
Friend details
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ForestVPNAPI
let id = 987 // UUID |
// Friend details
FriendshipAPI.getFriend(id: id) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func getFriendshipInvitation(code: String, completion: @escaping (_ data: FriendshipInvitation?, _ error: Error?) -> Void)
Friendship invitation details
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ForestVPNAPI
let code = "code_example" // String |
// Friendship invitation details
FriendshipAPI.getFriendshipInvitation(code: code) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
code | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func listFriends(perPage: Double? = nil, page: Double? = nil, completion: @escaping (_ data: [Friendship]?, _ error: Error?) -> Void)
Get friends list
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ForestVPNAPI
let perPage = 987 // Double | (optional)
let page = 987 // Double | (optional)
// Get friends list
FriendshipAPI.listFriends(perPage: perPage, page: page) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
perPage | Double | [optional] | |
page | Double | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func rejectFriendshipInvitation(code: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
Reject friendship invitation
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ForestVPNAPI
let code = "code_example" // String |
// Reject friendship invitation
FriendshipAPI.rejectFriendshipInvitation(code: code) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
code | String |
Void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]