Skip to content

Latest commit

 

History

History
355 lines (246 loc) · 9.21 KB

FriendshipAPI.md

File metadata and controls

355 lines (246 loc) · 9.21 KB

FriendshipAPI

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

    open class func acceptFriendshipInvitation(code: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)

Accept friendship invitation

Example

// 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)
    }
}

Parameters

Name Type Description Notes
code String

Return type

Void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createFriendshipInvitation

    open class func createFriendshipInvitation(perPage: Double? = nil, page: Double? = nil, completion: @escaping (_ data: FriendshipInvitation?, _ error: Error?) -> Void)

Create friendship invitation

Example

// 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)
    }
}

Parameters

Name Type Description Notes
perPage Double [optional]
page Double [optional]

Return type

FriendshipInvitation

Authorization

bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteFriend

    open class func deleteFriend(id: UUID, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)

Delete friend

Example

// 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)
    }
}

Parameters

Name Type Description Notes
id UUID

Return type

Void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFriend

    open class func getFriend(id: UUID, completion: @escaping (_ data: Friendship?, _ error: Error?) -> Void)

Friend details

Example

// 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)
    }
}

Parameters

Name Type Description Notes
id UUID

Return type

Friendship

Authorization

bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFriendshipInvitation

    open class func getFriendshipInvitation(code: String, completion: @escaping (_ data: FriendshipInvitation?, _ error: Error?) -> Void)

Friendship invitation details

Example

// 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)
    }
}

Parameters

Name Type Description Notes
code String

Return type

FriendshipInvitation

Authorization

bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listFriends

    open class func listFriends(perPage: Double? = nil, page: Double? = nil, completion: @escaping (_ data: [Friendship]?, _ error: Error?) -> Void)

Get friends list

Example

// 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)
    }
}

Parameters

Name Type Description Notes
perPage Double [optional]
page Double [optional]

Return type

[Friendship]

Authorization

bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

rejectFriendshipInvitation

    open class func rejectFriendshipInvitation(code: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)

Reject friendship invitation

Example

// 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)
    }
}

Parameters

Name Type Description Notes
code String

Return type

Void (empty response body)

Authorization

bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]