Skip to content

Latest commit

 

History

History
140 lines (95 loc) · 3.76 KB

GeoApi.md

File metadata and controls

140 lines (95 loc) · 3.76 KB

forestvpn_api.api.GeoApi

Load the API package

import 'package:forestvpn_api/api.dart';

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

Method HTTP request Description
listCountries GET /geo/countries/ Countries list
listCurrencies GET /geo/currencies/ Correncies list
listLocations GET /locations/ Location list

listCountries

BuiltList listCountries()

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

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

Parameters

This endpoint does not need any parameter.

Return type

BuiltList<Country>

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]

listCurrencies

BuiltList listCurrencies()

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

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

Parameters

This endpoint does not need any parameter.

Return type

BuiltList<Currency>

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]

listLocations

BuiltList listLocations(xDeviceCoordinates)

Location 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().getGeoApi();
final String xDeviceCoordinates = xDeviceCoordinates_example; // String | 

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

Parameters

Name Type Description Notes
xDeviceCoordinates String [optional]

Return type

BuiltList<Location>

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]