Skip to content

Latest commit

 

History

History
206 lines (142 loc) · 5.9 KB

FcmAPI.md

File metadata and controls

206 lines (142 loc) · 5.9 KB

FcmAPI

All URIs are relative to https://api.forestvpn.com/v2

Method HTTP request Description
createFCMDevice POST /notification/fcm/ Device registration for push notification through out Firebase Cloud Messaging
deleteFCMDevice DELETE /notification/fcm/{registrationID}/ Delete fcm device
getFCMDevice GET /notification/fcm/{registrationID}/ Device info
updateFCMDevice PATCH /notification/fcm/{registrationID}/ Update device fcm properties

createFCMDevice

    open class func createFCMDevice(createFCMDeviceRequest: CreateFCMDeviceRequest, completion: @escaping (_ data: FCMDevice?, _ error: Error?) -> Void)

Device registration for push notification through out Firebase Cloud Messaging

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 createFCMDeviceRequest = CreateFCMDeviceRequest(registrationId: "registrationId_example", deviceId: "deviceId_example", active: false) // CreateFCMDeviceRequest | 

// Device registration for push notification through out Firebase Cloud Messaging
FcmAPI.createFCMDevice(createFCMDeviceRequest: createFCMDeviceRequest) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
createFCMDeviceRequest CreateFCMDeviceRequest

Return type

FCMDevice

Authorization

bearerAuth

HTTP request headers

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

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

deleteFCMDevice

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

Delete fcm device

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 registrationID = "registrationID_example" // String | 

// Delete fcm device
FcmAPI.deleteFCMDevice(registrationID: registrationID) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
registrationID 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]

getFCMDevice

    open class func getFCMDevice(registrationID: String, completion: @escaping (_ data: FCMDevice?, _ error: Error?) -> Void)

Device info

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 registrationID = "registrationID_example" // String | 

// Device info
FcmAPI.getFCMDevice(registrationID: registrationID) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
registrationID String

Return type

FCMDevice

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]

updateFCMDevice

    open class func updateFCMDevice(registrationID: String, updateFCMDeviceRequest: UpdateFCMDeviceRequest, completion: @escaping (_ data: FCMDevice?, _ error: Error?) -> Void)

Update device fcm properties

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 registrationID = "registrationID_example" // String | 
let updateFCMDeviceRequest = UpdateFCMDeviceRequest(deviceId: "deviceId_example", active: false) // UpdateFCMDeviceRequest | 

// Update device fcm properties
FcmAPI.updateFCMDevice(registrationID: registrationID, updateFCMDeviceRequest: updateFCMDeviceRequest) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
registrationID String
updateFCMDeviceRequest UpdateFCMDeviceRequest

Return type

FCMDevice

Authorization

bearerAuth

HTTP request headers

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

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