Documentation ¶
Index ¶
Constants ¶
View Source
const ( German = 1 SwissGerman = 2 French = 3 Italian = 4 English = 5 Spanish = 6 Romansh = 7 Nederlands = 8 Portuguese = 9 Chinese = 10 Russian = 11 Japanese = 12 Turkish = 13 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct { IDTextElement Price Price `xml:"price"` }
type AdventureLanguage ¶
type AdventureLanguage IDTextElement
func (AdventureLanguage) ToISO639_2B ¶
func (lang AdventureLanguage) ToISO639_2B() (string, bool)
type AdventureOffer ¶
type AdventureOffer struct { ID string `xml:"id"` Title Texts `xml:"title>text"` Description Texts `xml:"description>text"` BookingURL Texts `xml:"bookingUrl"` InfoURL Texts `xml:"infoUrl>text"` Weather IDTextElement `xml:"weather"` Duration IDTextElement `xml:"duration"` Languages []AdventureLanguage `xml:"adventureLanguages>adventureLanguage"` Seasons []IDTextElement `xml:"adventureSeasons>adventureSeason"` Segments []IDTextElement `xml:"adventureSegments>adventureSegment"` TravelGroups []IDTextElement `xml:"adventureTravelGroups>adventureTravelGroup"` Types []IDTextElement `xml:"adventureTypes>adventureType"` Activities []Activity `xml:"adventureActivities>adventureActivity"` Info adventureInfo `xml:"adventureInfo"` Address address `xml:"address"` Images []Image `xml:"images>image"` }
type AdventuresXml ¶
type AdventuresXml struct { XMLName xml.Name `xml:"offers"` Header offersXmlHeader `xml:"header"` AdventureOffers []AdventureOffer `xml:"adventureOffer"` }
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) GetAdventures ¶
func (c *Client) GetAdventures(page int) (*AdventuresXml, error)
type CustomDateTime ¶
CustomDateTime is a struct that allows to parse an empty string which so happens to be in the XML
func (*CustomDateTime) UnmarshalXML ¶
func (c *CustomDateTime) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type HotelOffer ¶
type HotelsXml ¶
type HotelsXml struct { XMLName xml.Name `xml:"offers"` Header offersXmlHeader `xml:"header"` HotelOffers []HotelOffer `xml:"hotelOffer"` }
type IDTextElement ¶
type Image ¶
type Image struct { Type int `xml:"type,attr"` Formats ImageFormats `xml:"imageFormat"` Created CustomDateTime `xml:"created"` Updated CustomDateTime `xml:"updated"` }
type ImageFormat ¶
type ImageFormats ¶
type ImageFormats []ImageFormat
func (ImageFormats) Original ¶
func (f ImageFormats) Original() (*ImageFormat, bool)
Click to show internal directories.
Click to hide internal directories.