Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (39 sloc) 1.55 KB
package aviasales
import "fmt"
type InputPricesNearestPlacesMatrix struct {
Currency string
Origin string
Destination string
ShowToAffiliates bool
DepartDate string
ReturnDate string
type DataPriceNearest struct {
Success bool `json:"success" bson:"success"`
Data []PriceNearest `json:"data" bson:"data"`
type PriceNearest struct {
Origins []string `json:"origins" bson:"origins"`
Destinations []string `json:"destinations" bson:"destinations"`
Prices []Price `json:"prices" bson:"prices"`
// PricesNearestPlacesMatrix returns prices directions between nearest to the target cities.
// Note! If you do not specify a starting point and destination, the API returns a list of the cheapest tickets, which were found in the last 48 hours.
// Documentation:
// Example URI:
func (a *AviasalesApi) PricesNearestPlacesMatrix(input InputPricesNearestPlacesMatrix) (prices DataPriceNearest, err error) {
err = a.getJson("v2/prices/nearest-places-matrix", map[string]string{
"currency": input.Currency,
"origin": input.Origin,
"destination": input.Destination,
"show_to_affiliates": fmt.Sprint(input.ShowToAffiliates),
"depart_date": input.DepartDate,
"return_date": input.ReturnDate,
"token": a.token,
}, &prices)
You can’t perform that action at this time.