mcfit

package
v0.0.0-...-441f3cd Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UrlStudios   = "https://rsg-group.api.magicline.com/connect/v1/studio"    // + "?studioTags=AKTIV-391B8025C1714FB9B15BB02F2F8AC0B2"
	UrlStudios2  = ""                                                         /* 165-byte string literal not displayed */
	UrlOccupancy = "https://www.mcfit.com/de/auslastung/antwort/request.json" // + "?tx_brastudioprofilesmcfitcom_brastudioprofiles%5BstudioId%5D=1536269110"
)

Variables

View Source
var (
	StudioIDs = []int{1536266890, 1536269110}
)

Functions

func FetchCurrentOccupancy

func FetchCurrentOccupancy(c *colly.Collector, studioID int, cb func(o Occupancy), ecb cfac.ErrorCallback) *sync.WaitGroup

func FetchOccupancy

func FetchOccupancy(c *colly.Collector, studioID int, cb func(o ResponseOccupancy), ecb cfac.ErrorCallback) *sync.WaitGroup

func FetchStudios

func FetchStudios(c *colly.Collector, cb func(s []Studio), ecb cfac.ErrorCallback)

func FetchStudiosByCoordinates

func FetchStudiosByCoordinates(c *colly.Collector, co cfac.Coordinate, dist float64, cb func(s []Studio), ecb cfac.ErrorCallback)

func NewMeasurable

func NewMeasurable() cfac.Measurable

Types

type Measurable

type Measurable struct {
	Location cfac.Coordinate
	Radius   float32
}

func (*Measurable) Fetch

func (m *Measurable) Fetch(c *colly.Collector, cb cfac.MeasurementCallback, ecb cfac.ErrorCallback) *sync.WaitGroup

type Occupancy

type Occupancy struct {
	StartTime  string `json:"startTime"`
	EndTime    string `json:"endTime"`
	Percentage int    `json:"percentage"`
	Level      string `json:"level"`
	IsCurrent  bool   `json:"isCurrent"`
}

type OpeningHour

type OpeningHour struct {
	DayOfWeekFrom string `json:"dayOfWeekFrom"`
	DayOfWeekTo   string `json:"dayOfWeekTo"`
	TimeFrom      string `json:"timeFrom"`
	TimeTo        string `json:"timeTo"`
}

type ResponseOccupancy

type ResponseOccupancy struct {
	StartTime string      `json:"startTime"`
	EndTime   string      `json:"endTime"`
	Items     []Occupancy `json:"items"`
}

type ResponseStudios

type ResponseStudios []Studio

type Studio

type Studio struct {
	ID                   int           `json:"id"`
	StudioName           string        `json:"studioName"`
	StudioPhone          string        `json:"studioPhone"`
	StudioEmail          string        `json:"studioEmail"`
	TrialSessionBookable bool          `json:"trialSessionBookable"`
	Address              StudioAddress `json:"address"`
	StudioTags           []StudioTag   `json:"studioTags"`
	MasterStudioID       interface{}   `json:"masterStudioId"`
	OpeningDate          string        `json:"openingDate"`
	ClosingDate          interface{}   `json:"closingDate"`
	OpeningHours         []OpeningHour `json:"openingHours"`
	ZoneID               string        `json:"zoneId"`
}

func (*Studio) DistanceTo

func (s *Studio) DistanceTo(to cfac.Coordinate) float64

type StudioAddress

type StudioAddress struct {
	Street                       string      `json:"street"`
	SecondStreet                 interface{} `json:"secondStreet"`
	CityPart                     interface{} `json:"cityPart"`
	District                     interface{} `json:"district"`
	City                         string      `json:"city"`
	ZipCode                      string      `json:"zipCode"`
	StreetAddition               interface{} `json:"streetAddition"`
	HouseNumber                  string      `json:"houseNumber"`
	BuildingName                 interface{} `json:"buildingName"`
	CountryCode                  string      `json:"countryCode"`
	CountryCodeAlpha2            string      `json:"countryCodeAlpha2"`
	Longitude                    float64     `json:"longitude"`
	Latitude                     float64     `json:"latitude"`
	StreetType                   interface{} `json:"streetType"`
	StreetBlock                  interface{} `json:"streetBlock"`
	Portal                       interface{} `json:"portal"`
	Stairway                     interface{} `json:"stairway"`
	Door                         interface{} `json:"door"`
	Floor                        interface{} `json:"floor"`
	Province                     interface{} `json:"province"`
	AdditionalAddressInformation interface{} `json:"additionalAddressInformation"`
}

type StudioTag

type StudioTag struct {
	Name       string `json:"name"`
	Identifier string `json:"identifier"`
}

Jump to

Keyboard shortcuts

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