qpxexpress
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package qpxexpress provides access to the QPX Express API.
For product documentation, see:http://developers.google.com/qpx-express
Creating a client¶
Usage example:
import "google.golang.org/api/qpxexpress/v1"...ctx := context.Background()qpxexpressService, err := qpxexpress.NewService(ctx)
In this example, Google Application Default Credentials are used for authentication.
For information on how to create and obtain Application Default Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options¶
To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
qpxexpressService, err := qpxexpress.NewService(ctx, option.WithAPIKey("AIza..."))To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)qpxexpressService, err := qpxexpress.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))Seehttps://godoc.org/google.golang.org/api/option/ for details on options.
Index¶
- type AircraftData
- type AirportData
- type BagDescriptor
- type CarrierData
- type CityData
- type Data
- type FareInfo
- type FlightInfo
- type FreeBaggageAllowance
- type LegInfo
- type PassengerCounts
- type PricingInfo
- type SegmentInfo
- type SegmentPricing
- type Service
- type SliceInfo
- type SliceInput
- type TaxData
- type TaxInfo
- type TimeOfDayRange
- type TripOption
- type TripOptionsRequest
- type TripOptionsResponse
- type TripsSearchCall
- type TripsSearchRequest
- type TripsSearchResponse
- type TripsService
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeAircraftData¶
type AircraftData struct {// Code: The aircraft code. For example, for a Boeing 777 the code would// be 777.Codestring `json:"code,omitempty"`// Kind: Identifies this as an aircraftData object. Value: the fixed// string qpxexpress#aircraftDataKindstring `json:"kind,omitempty"`// Name: The name of an aircraft, for example Boeing 777.Namestring `json:"name,omitempty"`// ForceSendFields is a list of field names (e.g. "Code") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Code") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}AircraftData: The make, model, and type of an aircraft.
func (*AircraftData)MarshalJSON¶
func (s *AircraftData) MarshalJSON() ([]byte,error)
typeAirportData¶
type AirportData struct {// City: The city code an airport is located in. For example, for JFK// airport, this is NYC.Citystring `json:"city,omitempty"`// Code: An airport's code. For example, for Boston Logan airport, this// is BOS.Codestring `json:"code,omitempty"`// Kind: Identifies this as an airport object. Value: the fixed string// qpxexpress#airportData.Kindstring `json:"kind,omitempty"`// Name: The name of an airport. For example, for airport BOS the name// is "Boston Logan International".Namestring `json:"name,omitempty"`// ForceSendFields is a list of field names (e.g. "City") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "City") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}AirportData: An airport.
func (*AirportData)MarshalJSON¶
func (s *AirportData) MarshalJSON() ([]byte,error)
typeBagDescriptor¶
type BagDescriptor struct {// CommercialName: Provides the commercial name for an optional service.CommercialNamestring `json:"commercialName,omitempty"`// Count: How many of this type of bag will be checked on this flight.Countint64 `json:"count,omitempty"`// Description: A description of the baggage.Description []string `json:"description,omitempty"`// Kind: Identifies this as a baggage object. Value: the fixed string// qpxexpress#bagDescriptor.Kindstring `json:"kind,omitempty"`// Subcode: The standard IATA subcode used to identify this optional// service.Subcodestring `json:"subcode,omitempty"`// ForceSendFields is a list of field names (e.g. "CommercialName") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CommercialName") to// include in API requests with the JSON null value. By default, fields// with empty values are omitted from API requests. However, any field// with an empty value appearing in NullFields will be sent to the// server as null. It is an error if a field in this list has a// non-empty value. This may be used to include null fields in Patch// requests.NullFields []string `json:"-"`}BagDescriptor: Information about an item of baggage.
func (*BagDescriptor)MarshalJSON¶
func (s *BagDescriptor) MarshalJSON() ([]byte,error)
typeCarrierData¶
type CarrierData struct {// Code: The IATA designator of a carrier (airline, etc). For example,// for American Airlines, the code is AA.Codestring `json:"code,omitempty"`// Kind: Identifies this as a kind of carrier (ie. an airline, bus line,// railroad, etc). Value: the fixed string qpxexpress#carrierData.Kindstring `json:"kind,omitempty"`// Name: The long, full name of a carrier. For example: American// Airlines.Namestring `json:"name,omitempty"`// ForceSendFields is a list of field names (e.g. "Code") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Code") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}CarrierData: Information about a carrier (ie. an airline, bus line,railroad, etc) that might be useful to display to an end-user.
func (*CarrierData)MarshalJSON¶
func (s *CarrierData) MarshalJSON() ([]byte,error)
typeCityData¶
type CityData struct {// Code: The IATA character ID of a city. For example, for Boston this// is BOS.Codestring `json:"code,omitempty"`// Country: The two-character country code of the country the city is// located in. For example, US for the United States of America.Countrystring `json:"country,omitempty"`// Kind: Identifies this as a city, typically with one or more airports.// Value: the fixed string qpxexpress#cityData.Kindstring `json:"kind,omitempty"`// Name: The full name of a city. An example would be: New York.Namestring `json:"name,omitempty"`// ForceSendFields is a list of field names (e.g. "Code") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Code") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}CityData: Information about a city that might be useful to anend-user; typically the city of an airport.
func (*CityData)MarshalJSON¶
typeData¶
type Data struct {// Aircraft: The aircraft that is flying between an origin and// destination.Aircraft []*AircraftData `json:"aircraft,omitempty"`// Airport: The airport of an origin or destination.Airport []*AirportData `json:"airport,omitempty"`// Carrier: The airline carrier of the aircraft flying between an origin// and destination. Allowed values are IATA carrier codes.Carrier []*CarrierData `json:"carrier,omitempty"`// City: The city that is either the origin or destination of part of a// trip.City []*CityData `json:"city,omitempty"`// Kind: Identifies this as QPX Express response resource, including a// trip's airport, city, taxes, airline, and aircraft. Value: the fixed// string qpxexpress#data.Kindstring `json:"kind,omitempty"`// Tax: The taxes due for flying between an origin and a destination.Tax []*TaxData `json:"tax,omitempty"`// ForceSendFields is a list of field names (e.g. "Aircraft") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Aircraft") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}Data: Detailed information about components found in the solutions ofthis response, including a trip's airport, city, taxes, airline, andaircraft.
func (*Data)MarshalJSON¶
typeFareInfo¶
type FareInfo struct {BasisCodestring `json:"basisCode,omitempty"`// Carrier: The carrier of the aircraft or other vehicle commuting// between two points.Carrierstring `json:"carrier,omitempty"`// Destination: The city code of the city the trip ends at.Destinationstring `json:"destination,omitempty"`// Id: A unique identifier of the fare.Idstring `json:"id,omitempty"`// Kind: Identifies this as a fare object. Value: the fixed string// qpxexpress#fareInfo.Kindstring `json:"kind,omitempty"`// Origin: The city code of the city the trip begins at.Originstring `json:"origin,omitempty"`// Private: Whether this is a private fare, for example one offered only// to select customers rather than the general public.Privatebool `json:"private,omitempty"`// ForceSendFields is a list of field names (e.g. "BasisCode") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "BasisCode") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}FareInfo: Complete information about a fare used in the solution to alow-fare search query. In the airline industry a fare is a price anairline charges for one-way travel between two points. A faretypically contains a carrier code, two city codes, a price, and afare basis. (A fare basis is a one-to-eight character alphanumericcode used to identify a fare.)
func (*FareInfo)MarshalJSON¶
typeFlightInfo¶
type FlightInfo struct {Carrierstring `json:"carrier,omitempty"`// Number: The flight number.Numberstring `json:"number,omitempty"`// ForceSendFields is a list of field names (e.g. "Carrier") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Carrier") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}FlightInfo: A flight is a sequence of legs with the same airlinecarrier and flight number. (A leg is the smallest unit of travel, inthe case of a flight a takeoff immediately followed by a landing attwo set points on a particular carrier with a particular flightnumber.) The naive view is that a flight is scheduled travel of anaircraft between two points, with possibly intermediate stops, butcarriers will frequently list flights that require a change ofaircraft between legs.
func (*FlightInfo)MarshalJSON¶
func (s *FlightInfo) MarshalJSON() ([]byte,error)
typeFreeBaggageAllowance¶
type FreeBaggageAllowance struct {// BagDescriptor: A representation of a type of bag, such as an ATPCo// subcode, Commercial Name, or other description.BagDescriptor []*BagDescriptor `json:"bagDescriptor,omitempty"`// Kilos: The maximum number of kilos all the free baggage together may// weigh.Kilosint64 `json:"kilos,omitempty"`// KilosPerPiece: The maximum number of kilos any one piece of baggage// may weigh.KilosPerPieceint64 `json:"kilosPerPiece,omitempty"`// Kind: Identifies this as free baggage object, allowed on one segment// of a trip. Value: the fixed string qpxexpress#freeBaggageAllowance.Kindstring `json:"kind,omitempty"`// Pieces: The number of free pieces of baggage allowed.Piecesint64 `json:"pieces,omitempty"`// Pounds: The number of pounds of free baggage allowed.Poundsint64 `json:"pounds,omitempty"`// ForceSendFields is a list of field names (e.g. "BagDescriptor") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "BagDescriptor") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}FreeBaggageAllowance: Information about free baggage allowed on onesegment of a trip.
func (*FreeBaggageAllowance)MarshalJSON¶
func (s *FreeBaggageAllowance) MarshalJSON() ([]byte,error)
typeLegInfo¶
type LegInfo struct {// Aircraft: The aircraft (or bus, ferry, railcar, etc) travelling// between the two points of this leg.Aircraftstring `json:"aircraft,omitempty"`// ArrivalTime: The scheduled time of arrival at the destination of the// leg, local to the point of arrival.ArrivalTimestring `json:"arrivalTime,omitempty"`// ChangePlane: Whether you have to change planes following this leg.// Only applies to the next leg.ChangePlanebool `json:"changePlane,omitempty"`// ConnectionDuration: Duration of a connection following this leg, in// minutes.ConnectionDurationint64 `json:"connectionDuration,omitempty"`// DepartureTime: The scheduled departure time of the leg, local to the// point of departure.DepartureTimestring `json:"departureTime,omitempty"`// Destination: The leg destination as a city and airport.Destinationstring `json:"destination,omitempty"`// DestinationTerminal: The terminal the flight is scheduled to arrive// at.DestinationTerminalstring `json:"destinationTerminal,omitempty"`// Duration: The scheduled travelling time from the origin to the// destination.Durationint64 `json:"duration,omitempty"`// Id: An identifier that uniquely identifies this leg in the solution.Idstring `json:"id,omitempty"`// Kind: Identifies this as a leg object. A leg is the smallest unit of// travel, in the case of a flight a takeoff immediately followed by a// landing at two set points on a particular carrier with a particular// flight number. Value: the fixed string qpxexpress#legInfo.Kindstring `json:"kind,omitempty"`// Meal: A simple, general description of the meal(s) served on the// flight, for example: "Hot meal".Mealstring `json:"meal,omitempty"`// Mileage: The number of miles in this leg.Mileageint64 `json:"mileage,omitempty"`// OnTimePerformance: In percent, the published on time performance on// this leg.OnTimePerformanceint64 `json:"onTimePerformance,omitempty"`// OperatingDisclosure: Department of Transportation disclosure// information on the actual operator of a flight in a code share. (A// code share refers to a marketing agreement between two carriers,// where one carrier will list in its schedules (and take bookings for)// flights that are actually operated by another carrier.)OperatingDisclosurestring `json:"operatingDisclosure,omitempty"`// Origin: The leg origin as a city and airport.Originstring `json:"origin,omitempty"`// OriginTerminal: The terminal the flight is scheduled to depart from.OriginTerminalstring `json:"originTerminal,omitempty"`// Secure: Whether passenger information must be furnished to the United// States Transportation Security Administration (TSA) prior to// departure.Securebool `json:"secure,omitempty"`// ForceSendFields is a list of field names (e.g. "Aircraft") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Aircraft") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}LegInfo: Information about a leg. (A leg is the smallest unit oftravel, in the case of a flight a takeoff immediately followed by alanding at two set points on a particular carrier with a particularflight number.)
func (*LegInfo)MarshalJSON¶
typePassengerCounts¶
type PassengerCounts struct {// AdultCount: The number of passengers that are adults.AdultCountint64 `json:"adultCount,omitempty"`// ChildCount: The number of passengers that are children.ChildCountint64 `json:"childCount,omitempty"`// InfantInLapCount: The number of passengers that are infants// travelling in the lap of an adult.InfantInLapCountint64 `json:"infantInLapCount,omitempty"`// InfantInSeatCount: The number of passengers that are infants each// assigned a seat.InfantInSeatCountint64 `json:"infantInSeatCount,omitempty"`// Kind: Identifies this as a passenger count object, representing the// number of passengers. Value: the fixed string// qpxexpress#passengerCounts.Kindstring `json:"kind,omitempty"`// SeniorCount: The number of passengers that are senior citizens.SeniorCountint64 `json:"seniorCount,omitempty"`// ForceSendFields is a list of field names (e.g. "AdultCount") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AdultCount") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}PassengerCounts: The number and type of passengers. Unfortunately thedefinition of an infant, child, adult, and senior citizen variesacross carriers and reservation systems.
func (*PassengerCounts)MarshalJSON¶
func (s *PassengerCounts) MarshalJSON() ([]byte,error)
typePricingInfo¶
type PricingInfo struct {// BaseFareTotal: The total fare in the base fare currency (the currency// of the country of origin). This element is only present when the// sales currency and the currency of the country of commencement are// different.BaseFareTotalstring `json:"baseFareTotal,omitempty"`// Fare: The fare used to price one or more segments.Fare []*FareInfo `json:"fare,omitempty"`// FareCalculation: The horizontal fare calculation. This is a field on// a ticket that displays all of the relevant items that go into the// calculation of the fare.FareCalculationstring `json:"fareCalculation,omitempty"`// Kind: Identifies this as a pricing object, representing the price of// one or more travel segments. Value: the fixed string// qpxexpress#pricingInfo.Kindstring `json:"kind,omitempty"`// LatestTicketingTime: The latest ticketing time for this pricing// assuming the reservation occurs at ticketing time and there is no// change in fares/rules. The time is local to the point of sale (POS).LatestTicketingTimestring `json:"latestTicketingTime,omitempty"`// Passengers: The number of passengers to which this price applies.Passengers *PassengerCounts `json:"passengers,omitempty"`// Ptc: The passenger type code for this pricing. An alphanumeric code// used by a carrier to restrict fares to certain categories of// passenger. For instance, a fare might be valid only for senior// citizens.Ptcstring `json:"ptc,omitempty"`// Refundable: Whether the fares on this pricing are refundable.Refundablebool `json:"refundable,omitempty"`// SaleFareTotal: The total fare in the sale or equivalent currency.SaleFareTotalstring `json:"saleFareTotal,omitempty"`// SaleTaxTotal: The taxes in the sale or equivalent currency.SaleTaxTotalstring `json:"saleTaxTotal,omitempty"`// SaleTotal: Total per-passenger price (fare and tax) in the sale or// equivalent currency.SaleTotalstring `json:"saleTotal,omitempty"`// SegmentPricing: The per-segment price and baggage information.SegmentPricing []*SegmentPricing `json:"segmentPricing,omitempty"`// Tax: The taxes used to calculate the tax total per ticket.Tax []*TaxInfo `json:"tax,omitempty"`// ForceSendFields is a list of field names (e.g. "BaseFareTotal") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "BaseFareTotal") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}PricingInfo: The price of one or more travel segments. The currencyused to purchase tickets is usually determined by the sale/ticketingcity or the sale/ticketing country, unless none are specified, inwhich case it defaults to that of the journey origin country.
func (*PricingInfo)MarshalJSON¶
func (s *PricingInfo) MarshalJSON() ([]byte,error)
typeSegmentInfo¶
type SegmentInfo struct {// BookingCode: The booking code or class for this segment.BookingCodestring `json:"bookingCode,omitempty"`// BookingCodeCount: The number of seats available in this booking code// on this segment.BookingCodeCountint64 `json:"bookingCodeCount,omitempty"`// Cabin: The cabin booked for this segment.Cabinstring `json:"cabin,omitempty"`// ConnectionDuration: In minutes, the duration of the connection// following this segment.ConnectionDurationint64 `json:"connectionDuration,omitempty"`// Duration: The duration of the flight segment in minutes.Durationint64 `json:"duration,omitempty"`// Flight: The flight this is a segment of.Flight *FlightInfo `json:"flight,omitempty"`// Id: An id uniquely identifying the segment in the solution.Idstring `json:"id,omitempty"`// Kind: Identifies this as a segment object. A segment is one or more// consecutive legs on the same flight. For example a hypothetical// flight ZZ001, from DFW to OGG, could have one segment with two legs:// DFW to HNL (leg 1), HNL to OGG (leg 2). Value: the fixed string// qpxexpress#segmentInfo.Kindstring `json:"kind,omitempty"`// Leg: The legs composing this segment.Leg []*LegInfo `json:"leg,omitempty"`// MarriedSegmentGroup: The solution-based index of a segment in a// married segment group. Married segments can only be booked together.// For example, an airline might report a certain booking code as sold// out from Boston to Pittsburgh, but as available as part of two// married segments Boston to Chicago connecting through Pittsburgh. For// example content of this field, consider the round-trip flight ZZ1// PHX-PHL ZZ2 PHL-CLT ZZ3 CLT-PHX. This has three segments, with the// two outbound ones (ZZ1 ZZ2) married. In this case, the two outbound// segments belong to married segment group 0, and the return segment// belongs to married segment group 1.MarriedSegmentGroupstring `json:"marriedSegmentGroup,omitempty"`// SubjectToGovernmentApproval: Whether the operation of this segment// remains subject to government approval.SubjectToGovernmentApprovalbool `json:"subjectToGovernmentApproval,omitempty"`// ForceSendFields is a list of field names (e.g. "BookingCode") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "BookingCode") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}SegmentInfo: Details of a segment of a flight; a segment is one ormore consecutive legs on the same flight. For example a hypotheticalflight ZZ001, from DFW to OGG, would have one segment with two legs:DFW to HNL (leg 1), HNL to OGG (leg 2), and DFW to OGG (legs 1 and2).
func (*SegmentInfo)MarshalJSON¶
func (s *SegmentInfo) MarshalJSON() ([]byte,error)
typeSegmentPricing¶
type SegmentPricing struct {// FareId: A segment identifier unique within a single solution. It is// used to refer to different parts of the same solution.FareIdstring `json:"fareId,omitempty"`// FreeBaggageOption: Details of the free baggage allowance on this// segment.FreeBaggageOption []*FreeBaggageAllowance `json:"freeBaggageOption,omitempty"`// Kind: Identifies this as a segment pricing object, representing the// price of this segment. Value: the fixed string// qpxexpress#segmentPricing.Kindstring `json:"kind,omitempty"`// SegmentId: Unique identifier in the response of this segment.SegmentIdstring `json:"segmentId,omitempty"`// ForceSendFields is a list of field names (e.g. "FareId") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "FareId") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}SegmentPricing: The price of this segment.
func (*SegmentPricing)MarshalJSON¶
func (s *SegmentPricing) MarshalJSON() ([]byte,error)
typeService¶
type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentTrips *TripsService// contains filtered or unexported fields} funcNewdeprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
funcNewService¶added inv0.5.0
NewService creates a new Service.
typeSliceInfo¶
type SliceInfo struct {// Duration: The duration of the slice in minutes.Durationint64 `json:"duration,omitempty"`// Kind: Identifies this as a slice object. A slice represents a// traveller's intent, the portion of a low-fare search corresponding to// a traveler's request to get between two points. One-way journeys are// generally expressed using 1 slice, round-trips using 2. Value: the// fixed string qpxexpress#sliceInfo.Kindstring `json:"kind,omitempty"`// Segment: The segment(s) constituting the slice.Segment []*SegmentInfo `json:"segment,omitempty"`// ForceSendFields is a list of field names (e.g. "Duration") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Duration") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}SliceInfo: Information about a slice. A slice represents atraveller's intent, the portion of a low-fare search corresponding toa traveler's request to get between two points. One-way journeys aregenerally expressed using 1 slice, round-trips using 2. For example,if a traveler specifies the following trip in a user interface:| Origin | Destination | Departure Date | | BOS | LAX | March 10,2007 | | LAX | SYD | March 17, 2007 | | SYD | BOS | March 22, 2007|then this is a three slice trip.
func (*SliceInfo)MarshalJSON¶
typeSliceInput¶
type SliceInput struct {// Alliance: Slices with only the carriers in this alliance should be// returned; do not use this field with permittedCarrier. Allowed values// are ONEWORLD, SKYTEAM, and STAR.Alliancestring `json:"alliance,omitempty"`// Date: Departure date in YYYY-MM-DD format.Datestring `json:"date,omitempty"`// Destination: Airport or city IATA designator of the destination.Destinationstring `json:"destination,omitempty"`// Kind: Identifies this as a slice input object, representing the// criteria a desired slice must satisfy. Value: the fixed string// qpxexpress#sliceInput.Kindstring `json:"kind,omitempty"`// MaxConnectionDuration: The longest connection between two legs, in// minutes, you are willing to accept.MaxConnectionDurationint64 `json:"maxConnectionDuration,omitempty"`// MaxStops: The maximum number of stops you are willing to accept in// this slice.MaxStopsint64 `json:"maxStops,omitempty"`// Origin: Airport or city IATA designator of the origin.Originstring `json:"origin,omitempty"`// PermittedCarrier: A list of 2-letter IATA airline designators. Slices// with only these carriers should be returned.PermittedCarrier []string `json:"permittedCarrier,omitempty"`// PermittedDepartureTime: Slices must depart in this time of day range,// local to the point of departure.PermittedDepartureTime *TimeOfDayRange `json:"permittedDepartureTime,omitempty"`// PreferredCabin: Prefer solutions that book in this cabin for this// slice. Allowed values are COACH, PREMIUM_COACH, BUSINESS, and FIRST.PreferredCabinstring `json:"preferredCabin,omitempty"`// ProhibitedCarrier: A list of 2-letter IATA airline designators.// Exclude slices that use these carriers.ProhibitedCarrier []string `json:"prohibitedCarrier,omitempty"`// ForceSendFields is a list of field names (e.g. "Alliance") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Alliance") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}SliceInput: Criteria a desired slice must satisfy.
func (*SliceInput)MarshalJSON¶
func (s *SliceInput) MarshalJSON() ([]byte,error)
typeTaxData¶
type TaxData struct {// Id: An identifier uniquely identifying a tax in a response.Idstring `json:"id,omitempty"`// Kind: Identifies this as a tax data object, representing some tax.// Value: the fixed string qpxexpress#taxData.Kindstring `json:"kind,omitempty"`// Name: The name of a tax.Namestring `json:"name,omitempty"`// ForceSendFields is a list of field names (e.g. "Id") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Id") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}TaxData: Tax data.
func (*TaxData)MarshalJSON¶
typeTaxInfo¶
type TaxInfo struct {// ChargeType: Whether this is a government charge or a carrier// surcharge.ChargeTypestring `json:"chargeType,omitempty"`// Code: The code to enter in the ticket's tax box.Codestring `json:"code,omitempty"`// Country: For government charges, the country levying the charge.Countrystring `json:"country,omitempty"`// Id: Identifier uniquely identifying this tax in a response. Not// present for unnamed carrier surcharges.Idstring `json:"id,omitempty"`// Kind: Identifies this as a tax information object. Value: the fixed// string qpxexpress#taxInfo.Kindstring `json:"kind,omitempty"`// SalePrice: The price of the tax in the sales or equivalent currency.SalePricestring `json:"salePrice,omitempty"`// ForceSendFields is a list of field names (e.g. "ChargeType") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ChargeType") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}TaxInfo: Tax information.
func (*TaxInfo)MarshalJSON¶
typeTimeOfDayRange¶
type TimeOfDayRange struct {// EarliestTime: The earliest time of day in HH:MM format.EarliestTimestring `json:"earliestTime,omitempty"`// Kind: Identifies this as a time of day range object, representing two// times in a single day defining a time range. Value: the fixed string// qpxexpress#timeOfDayRange.Kindstring `json:"kind,omitempty"`// LatestTime: The latest time of day in HH:MM format.LatestTimestring `json:"latestTime,omitempty"`// ForceSendFields is a list of field names (e.g. "EarliestTime") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "EarliestTime") to include// in API requests with the JSON null value. By default, fields with// empty values are omitted from API requests. However, any field with// an empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}TimeOfDayRange: Two times in a single day defining a time range.
func (*TimeOfDayRange)MarshalJSON¶
func (s *TimeOfDayRange) MarshalJSON() ([]byte,error)
typeTripOption¶
type TripOption struct {// Id: Identifier uniquely identifying this trip in a response.Idstring `json:"id,omitempty"`// Kind: Identifies this as a trip information object. Value: the fixed// string qpxexpress#tripOption.Kindstring `json:"kind,omitempty"`// Pricing: Per passenger pricing information.Pricing []*PricingInfo `json:"pricing,omitempty"`// SaleTotal: The total price for all passengers on the trip, in the// form of a currency followed by an amount, e.g. USD253.35.SaleTotalstring `json:"saleTotal,omitempty"`// Slice: The slices that make up this trip's itinerary.Slice []*SliceInfo `json:"slice,omitempty"`// ForceSendFields is a list of field names (e.g. "Id") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Id") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}TripOption: Trip information.
func (*TripOption)MarshalJSON¶
func (s *TripOption) MarshalJSON() ([]byte,error)
typeTripOptionsRequest¶
type TripOptionsRequest struct {// MaxPrice: Do not return solutions that cost more than this price. The// alphabetical part of the price is in ISO 4217. The format, in regex,// is [A-Z]{3}\d+(\.\d+)? Example: $102.07MaxPricestring `json:"maxPrice,omitempty"`// Passengers: Counts for each passenger type in the request.Passengers *PassengerCounts `json:"passengers,omitempty"`// Refundable: Return only solutions with refundable fares.Refundablebool `json:"refundable,omitempty"`// SaleCountry: IATA country code representing the point of sale. This// determines the "equivalent amount paid" currency for the ticket.SaleCountrystring `json:"saleCountry,omitempty"`// Slice: The slices that make up the itinerary of this trip. A slice// represents a traveler's intent, the portion of a low-fare search// corresponding to a traveler's request to get between two points.// One-way journeys are generally expressed using one slice, round-trips// using two. An example of a one slice trip with three segments might// be BOS-SYD, SYD-LAX, LAX-BOS if the traveler only stopped in SYD and// LAX just long enough to change planes.Slice []*SliceInput `json:"slice,omitempty"`// Solutions: The number of solutions to return, maximum 500.Solutionsint64 `json:"solutions,omitempty"`// TicketingCountry: IATA country code representing the point of// ticketing.TicketingCountrystring `json:"ticketingCountry,omitempty"`// ForceSendFields is a list of field names (e.g. "MaxPrice") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "MaxPrice") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}TripOptionsRequest: A QPX Express search request, which will yieldone or more solutions.
func (*TripOptionsRequest)MarshalJSON¶
func (s *TripOptionsRequest) MarshalJSON() ([]byte,error)
typeTripOptionsResponse¶
type TripOptionsResponse struct {// Data: Informational data global to list of solutions.Data *Data `json:"data,omitempty"`// Kind: Identifies this as a QPX Express trip response object, which// consists of zero or more solutions. Value: the fixed string// qpxexpress#tripOptions.Kindstring `json:"kind,omitempty"`// RequestId: An identifier uniquely identifying this response.RequestIdstring `json:"requestId,omitempty"`// TripOption: A list of priced itinerary solutions to the QPX Express// query.TripOption []*TripOption `json:"tripOption,omitempty"`// ForceSendFields is a list of field names (e.g. "Data") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Data") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}TripOptionsResponse: A QPX Express search response.
func (*TripOptionsResponse)MarshalJSON¶
func (s *TripOptionsResponse) MarshalJSON() ([]byte,error)
typeTripsSearchCall¶
type TripsSearchCall struct {// contains filtered or unexported fields}func (*TripsSearchCall)Context¶
func (c *TripsSearchCall) Context(ctxcontext.Context) *TripsSearchCall
Context sets the context to be used in this call's Do method. Anypending HTTP request will be aborted if the provided context iscanceled.
func (*TripsSearchCall)Do¶
func (c *TripsSearchCall) Do(opts ...googleapi.CallOption) (*TripsSearchResponse,error)
Do executes the "qpxExpress.trips.search" call.Exactly one of *TripsSearchResponse or error will be non-nil. Anynon-2xx status code is an error. Response headers are in either*TripsSearchResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error wasbecause http.StatusNotModified was returned.
func (*TripsSearchCall)Fields¶
func (c *TripsSearchCall) Fields(s ...googleapi.Field) *TripsSearchCall
Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponsefor more information.
func (*TripsSearchCall)Header¶
func (c *TripsSearchCall) Header()http.Header
Header returns an http.Header that can be modified by the caller toadd HTTP headers to the request.
typeTripsSearchRequest¶
type TripsSearchRequest struct {// Request: A QPX Express search request. Required values are at least// one adult or senior passenger, an origin, a destination, and a date.Request *TripOptionsRequest `json:"request,omitempty"`// ForceSendFields is a list of field names (e.g. "Request") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Request") to include in// API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}TripsSearchRequest: A QPX Express search request.
func (*TripsSearchRequest)MarshalJSON¶
func (s *TripsSearchRequest) MarshalJSON() ([]byte,error)
typeTripsSearchResponse¶
type TripsSearchResponse struct {// Kind: Identifies this as a QPX Express API search response resource.// Value: the fixed string qpxExpress#tripsSearch.Kindstring `json:"kind,omitempty"`// Trips: All possible solutions to the QPX Express search request.Trips *TripOptionsResponse `json:"trips,omitempty"`// ServerResponse contains the HTTP response code and headers from the// server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Kind") to// unconditionally include in API requests. By default, fields with// empty values are omitted from API requests. However, any non-pointer,// non-interface field appearing in ForceSendFields will be sent to the// server regardless of whether the field is empty or not. This may be// used to include empty fields in Patch requests.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Kind") to include in API// requests with the JSON null value. By default, fields with empty// values are omitted from API requests. However, any field with an// empty value appearing in NullFields will be sent to the server as// null. It is an error if a field in this list has a non-empty value.// This may be used to include null fields in Patch requests.NullFields []string `json:"-"`}TripsSearchResponse: A QPX Express search response.
func (*TripsSearchResponse)MarshalJSON¶
func (s *TripsSearchResponse) MarshalJSON() ([]byte,error)
typeTripsService¶
type TripsService struct {// contains filtered or unexported fields}funcNewTripsService¶
func NewTripsService(s *Service) *TripsService
func (*TripsService)Search¶
func (r *TripsService) Search(tripssearchrequest *TripsSearchRequest) *TripsSearchCall
Search: Returns a list of flights.