apirtschedule

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScheduleDeparture

type ScheduleDeparture struct {
	StopSIDU       string     `db:"stop_sidu" json:"stop_sidu"`
	RouteShortName *string    `db:"route_short_name" json:"route_short_name,omitempty"`
	RouteLongName  *string    `db:"route_long_name" json:"route_long_name,omitempty"`
	TripHeadsign   *string    `db:"trip_headsign" json:"trip_headsign,omitempty"`
	DepartureTime  *time.Time `db:"departure_time" json:"departure_time"`
}

type ScheduleParams

type ScheduleParams struct {
	FeedIDs    []int    `json:"feed_ids" validate:"required,gt=0"`
	StopIDs    []string `json:"stop_ids" validate:"required,gt=0"`
	MaxSeconds uint     `json:"max_seconds" validate:"required,gt=0"`

	// Non-required
	Time *time.Time `json:"time" validate:"required"` // Default: now
}

type ScheduleResponse

type ScheduleResponse struct {
	Schedule *[]ScheduleDeparture `json:"schedule,omitempty"`
}

func RTSchedule

func RTSchedule(runtime *apirtinit.MobrouteRuntime, params *ScheduleParams) (*ScheduleResponse, error)

Jump to

Keyboard shortcuts

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