flightutils

package
v0.0.0-...-6307f30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBestPrice

func GetBestPrice(origin model.OriginInfo, destination model.DestinationInfo) (float64, error)

func GetBestPriceForGivenDates

func GetBestPriceForGivenDates(departureSkyScannerID string, arrivalSkyScannerID string, dates []string) (float64, error)

func GetPriceForRoute

func GetPriceForRoute(db *sql.DB, weekend string, origin string, destination string) (float64, error)

Function to get price for a given pair of skyscanner IDs

func SearchOneWay

func SearchOneWay(Departure_SkyScannerID string, Arrival_SkyScannerID string, date string) (float64, error)

func UpdateSkyscannerPrices

func UpdateSkyscannerPrices(origins []model.OriginInfo)

Types

type Itinerary

type Itinerary struct {
	Price struct {
		Raw       float64 `json:"raw"`
		Formatted string  `json:"formatted"`
	} `json:"price"`
}

type Response

type Response struct {
	Status  bool   `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Itineraries []Itinerary `json:"itineraries"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL