Skip to content

Latest commit

 

History

History
99 lines (67 loc) · 2.76 KB

WireguardApi.md

File metadata and controls

99 lines (67 loc) · 2.76 KB

forestvpn_api.api.WireguardApi

Load the API package

import 'package:forestvpn_api/api.dart';

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

Method HTTP request Description
getWireGuardPeerInfo GET /wireguard/peers/{pubKey}/ Wireguard peer info
listWireGuardPeers GET /wireguard/peers/ Wireguard peers list

getWireGuardPeerInfo

WireGuardPeerInfo getWireGuardPeerInfo(pubKey)

Wireguard peer 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().getWireguardApi();
final String pubKey = pubKey_example; // String | 

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

Parameters

Name Type Description Notes
pubKey String

Return type

WireGuardPeerInfo

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]

listWireGuardPeers

BuiltList listWireGuardPeers()

Wireguard peers list

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().getWireguardApi();

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

Parameters

This endpoint does not need any parameter.

Return type

BuiltList<WireGuardPeerInfo>

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]