go-global

module
v0.0.0-...-64e79c0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT

README

Go library for Go Global Travel

documentation: https://data.goglobal.travel/specs/XmlSpecs_LatestVersion.html

Example of usage:

service := client.NewGoGlobalService(
		API_URL,
		AGENCY_ID,
		USERNAME,
		PASSWORD,
	)

	response, err := service.Search(models.HotelSearchRequest{
		ResponseFormat: client.ResponseFormatJson,
		IncludeGeo:     true,
		Currency:       "EUR",
		FilterPriceMin: nil,
		FilterPriceMax: nil,
		CityCode:       []int64{75},
		ArrivalDate:    "2023-10-01",
		Nights:         2,
		Apartments:     false,
		Nationality:    "RU",
		Rooms: models.SearchRooms{
			Room: []models.SearchRoom{
				{
					Adults:     2,
					RoomCount:  1,
					ChildCount: 0,
					CotCount:   0,
					ChildAge:   nil,
				},
			},
		},
	}, nil, nil)
	if err != nil {
		log.Fatal(err)
	}

	for _, d := range response {
	    ///handle offers
	    ...
	}

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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