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 |
[]Country ListCountries(ctx).Execute()
Countries list
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GeoApi.ListCountries(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GeoApi.ListCountries``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCountries`: []Country
fmt.Fprintf(os.Stdout, "Response from `GeoApi.ListCountries`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListCountriesRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Currency ListCurrencies(ctx).Execute()
Correncies list
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GeoApi.ListCurrencies(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GeoApi.ListCurrencies``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCurrencies`: []Currency
fmt.Fprintf(os.Stdout, "Response from `GeoApi.ListCurrencies`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListCurrenciesRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Location ListLocations(ctx).XDeviceCoordinates(xDeviceCoordinates).Execute()
Location list
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
xDeviceCoordinates := "xDeviceCoordinates_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GeoApi.ListLocations(context.Background()).XDeviceCoordinates(xDeviceCoordinates).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GeoApi.ListLocations``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListLocations`: []Location
fmt.Fprintf(os.Stdout, "Response from `GeoApi.ListLocations`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListLocationsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
xDeviceCoordinates | string |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]