Skip to content

Latest commit

 

History

History
193 lines (124 loc) · 4.41 KB

GeoApi.md

File metadata and controls

193 lines (124 loc) · 4.41 KB

\GeoApi

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

[]Country ListCountries(ctx).Execute()

Countries list

Example

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)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiListCountriesRequest struct via the builder pattern

Return type

[]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

[]Currency ListCurrencies(ctx).Execute()

Correncies list

Example

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)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiListCurrenciesRequest struct via the builder pattern

Return type

[]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

[]Location ListLocations(ctx).XDeviceCoordinates(xDeviceCoordinates).Execute()

Location list

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListLocationsRequest struct via the builder pattern

Name Type Description Notes
xDeviceCoordinates string

Return type

[]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]