Skip to content

Latest commit

 

History

History
194 lines (133 loc) · 5.8 KB

FcmApi.md

File metadata and controls

194 lines (133 loc) · 5.8 KB

forestvpn_api.api.FcmApi

Load the API package

import 'package:forestvpn_api/api.dart';

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

FCMDevice createFCMDevice(createFCMDeviceRequest)

Device registration for push notification through out Firebase Cloud Messaging

Example

import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = ForestvpnApi().getFcmApi();
final CreateFCMDeviceRequest createFCMDeviceRequest = ; // CreateFCMDeviceRequest | 

try {
    final response = api.createFCMDevice(createFCMDeviceRequest);
    print(response);
} catch on DioError (e) {
    print('Exception when calling FcmApi->createFCMDevice: $e\n');
}

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

deleteFCMDevice(registrationID)

Delete fcm device

Example

import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = ForestvpnApi().getFcmApi();
final String registrationID = registrationID_example; // String | 

try {
    api.deleteFCMDevice(registrationID);
} catch on DioError (e) {
    print('Exception when calling FcmApi->deleteFCMDevice: $e\n');
}

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

FCMDevice getFCMDevice(registrationID)

Device info

Example

import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = ForestvpnApi().getFcmApi();
final String registrationID = registrationID_example; // String | 

try {
    final response = api.getFCMDevice(registrationID);
    print(response);
} catch on DioError (e) {
    print('Exception when calling FcmApi->getFCMDevice: $e\n');
}

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

FCMDevice updateFCMDevice(registrationID, updateFCMDeviceRequest)

Update device fcm properties

Example

import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';

final api = ForestvpnApi().getFcmApi();
final String registrationID = registrationID_example; // String | 
final UpdateFCMDeviceRequest updateFCMDeviceRequest = ; // UpdateFCMDeviceRequest | 

try {
    final response = api.updateFCMDevice(registrationID, updateFCMDeviceRequest);
    print(response);
} catch on DioError (e) {
    print('Exception when calling FcmApi->updateFCMDevice: $e\n');
}

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]