Documentation
¶
Overview ¶
Package stnet is a wrapper to access the STnet API.
Index ¶
- Constants
- func DECtoSEX(angle float64) float64
- func WGS84toCH1903(lng, lat float64) (x, y int)
- type Activity
- type Address
- type AddressClient
- type AdventureExecutionDate
- type AdventureInfo
- type AdventureOffer
- type AdventureType
- type Adventureaddress
- type AkeyAddress
- type Bookingurl
- type Client
- type Description
- type Format
- type Georeference
- type GetAddressResult
- type GetAdventureOffersResult
- type GetOffersResult
- type GetResortsResult
- type IDLangText
- type IDSTRLangText
- type Image
- type Imageformat
- type LangText
- type Leadtext
- type Offer
- type Place
- type Resort
- type ResortZip
- type ResponseHeader
- type Roomcategory
- type Subcat
- type Title
- type TranslatedText
Constants ¶
View Source
const ( GeoExact = "EXACT" GeoOnlyStreet = "ONLY_STREET" GeoOnlyZip = "ONLY_ZIP" GeoNone = "NONE" TypeHotel = "597" TypePara = "1556" )
Variables ¶
This section is empty.
Functions ¶
func WGS84toCH1903 ¶
Types ¶
type AddressClient ¶
func NewAddressClient ¶
func NewAddressClient(endpoint, username, password string) *AddressClient
type AdventureExecutionDate ¶
type AdventureInfo ¶
type AdventureInfo struct {
Subcat Subcat `xml:"subcat"`
OfferLink cdataString `xml:"offerLink"`
NameEntertainer cdataString `xml:"nameEntertainer"`
PriceFrom string `xml:"priceFrom"`
PriceNormal string `xml:"priceNormal"`
ExecutionRkey string `xml:"executionResort>id"`
MaxParticipants int `xml:"maxParticipants"`
MinParticipants int `xml:"minParticipants"`
ExecutionUnknown bool `xml:"executionUnknown"`
ExecutionOnRequest bool `xml:"executionOnRequest"`
ReservationEmail bool `xml:"reservationEmail"`
ReservationEmailInput cdataString `xml:"reservationEmailInput"`
ReservationTel bool `xml:"reservationTel"`
ReservationTelInput cdataString `xml:"reservationTelInput"`
ReservationOnline int `xml:"reservationOnline"`
Admin2 cdataString `xml:"admin2"`
ExecutionPlaceFreetext cdataString `xml:"executionPlaceFreetext"`
}
func (*AdventureInfo) GetPrice ¶
func (a *AdventureInfo) GetPrice() float64
type AdventureOffer ¶
type AdventureOffer struct {
ID string `xml:"id"`
AdventureInfo AdventureInfo `xml:"adventureInfo"`
Address Adventureaddress `xml:"address"`
InfoURL IDSTRLangText `xml:"infoUrl"`
BookingURL IDSTRLangText `xml:"bookingUrl"`
AdventureExecutionDates []AdventureExecutionDate `xml:"adventureExecutionDates>adventureExecutionDate"`
AdventureTypes []IDSTRLangText `xml:"adventureTypes>adventureType"`
AdventureLanguages []IDSTRLangText `xml:"adventureLanguages>adventureLanguage"`
AdventureSeasons []IDSTRLangText `xml:"adventureSeasons>adventureSeason"`
AdventureSegments []IDSTRLangText `xml:"adventureSegments>adventureSegment"`
AdventureTravelGroups []IDSTRLangText `xml:"adventureTravelGroups>adventureTravelGroup"`
AdventureActivities []Activity `xml:"adventureActivities>adventureActivity"`
Images []Image `xml:"images"`
Title []Title `xml:"title>text"`
Description []Description `xml:"description>text"`
Leadtext []Leadtext `xml:"leadText>text"`
Weather []Leadtext `xml:"weather>text"`
Duration []Leadtext `xml:"duration>text"`
}
func (*AdventureOffer) GetAdventureSeasons ¶
func (a *AdventureOffer) GetAdventureSeasons() []string
func (*AdventureOffer) GetAdventureTypeIDs ¶
func (a *AdventureOffer) GetAdventureTypeIDs() []string
type AdventureType ¶
type Adventureaddress ¶
type Adventureaddress struct {
ID string `xml:"id"`
Rkey string `xml:"resort>id"`
Zip cdataString `xml:"zip"`
Place cdataString `xml:"place"`
Name1 cdataString `xml:"name1"`
Street1 cdataString `xml:"street1"`
Street2 cdataString `xml:"street2"`
Email cdataString `xml:"email"`
Phone1 cdataString `xml:"phone1"`
Url cdataString `xml:"url"`
}
type AkeyAddress ¶
type AkeyAddress struct {
ID string `xml:"id"`
Name cdataString `xml:"name1"`
Street cdataString `xml:"street1"`
Zip cdataString `xml:"zip"`
Place cdataString `xml:"place"`
Phone cdataString `xml:"phone1"`
Email cdataString `xml:"email"`
Resort Resort `xml:"resort"`
GeoReference Georeference `xml:"geoReference"`
}
type Bookingurl ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
NewClient creates a new Client (Session) to the STnet API with the given credentials
func (*Client) GetAddresses ¶
func (c *Client) GetAddresses() ([]AkeyAddress, error)
func (*Client) GetAdventureOffers ¶
func (c *Client) GetAdventureOffers() ([]AdventureOffer, error)
func (*Client) GetResorts ¶
GetResorts gets a list of resorts
type Description ¶
type Georeference ¶
type GetAddressResult ¶
type GetAddressResult struct {
XMLName xml.Name `xml:"addresses"`
Header ResponseHeader `xml:"header"`
Address []AkeyAddress `xml:"address"`
}
type GetAdventureOffersResult ¶
type GetAdventureOffersResult struct {
XMLName xml.Name `xml:"offers"`
Header ResponseHeader `xml:"header"`
Offer []AdventureOffer `xml:"adventureOffer"`
}
type GetOffersResult ¶
type GetOffersResult struct {
XMLName xml.Name `xml:"offers"`
Header ResponseHeader `xml:"header"`
Offer []Offer `xml:"hotelOffer"`
}
type GetResortsResult ¶
type GetResortsResult struct {
XMLName xml.Name `xml:"resorts"`
Header ResponseHeader `xml:"header"`
Resort []Resort `xml:"resort"`
}
type IDLangText ¶
type IDSTRLangText ¶
type Image ¶
type Image struct {
Imageformat []Imageformat `xml:"image"`
}
type Imageformat ¶
type Offer ¶
type Offer struct {
ID string `xml:"id"`
Subcat Subcat `xml:"hotelInfo>subcat"`
Place Place `xml:"hotelInfo>place"`
ValidFrom string `xml:"hotelInfo>validFrom"`
ValidTo string `xml:"hotelInfo>validTo"`
PriceFrom float64 `xml:"hotelInfo>priceFrom"`
PriceNormal float64 `xml:"hotelInfo>priceNormal"`
Description []Description `xml:"description>text"`
Bookingurl []Bookingurl `xml:"bookingUrl>text"`
Address Address `xml:"address"`
Images []Image `xml:"images"`
Title []Title `xml:"title>text"`
RoomcategoryID int `xml:"hotelInfo>roomCategory>id"`
Roomcategory []Roomcategory `xml:"hotelInfo>roomCategory>text"`
}
type Resort ¶
type Resort struct {
ID uint `xml:"id"`
Zip string `xml:"zip"`
Region string `xml:"region>id"`
Names []TranslatedText `xml:"name>text"`
Searchfield string `xml:"searchfield"`
ResortZips []ResortZip `xml:"resortZips>resortZip"`
Georeference Georeference `xml:"geoReference"`
}
type ResponseHeader ¶
type Roomcategory ¶
type TranslatedText ¶
Click to show internal directories.
Click to hide internal directories.