ro

package module
v0.0.0-...-9427a8b Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2013 License: MIT Imports: 9 Imported by: 0

README

ro

Small wrapper for Reittiopas API

Comes with a text based example client, see ro/ro

Thanks Hallo for helping out and especially thanks for preventing me from leaving the campus before I had the original code up & running back in 2011.

Documentation

Overview

Small wrapper for Reittiopas API ( http://developer.reittiopas.fi/pages/en/http-get-interface-version-2.php )

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(s string, v interface{}) bool

func GetNamedRoute

func GetNamedRoute(route string) (from, to string, ok bool)

func SetCredentials

func SetCredentials(user, pass string)

func SetRoutefile

func SetRoutefile(file string)

Types

type Coord

type Coord struct {
	X, Y float64
}

type Details

type Details struct {
	HouseNumber float64
}

type Legs

type Legs struct {
	Length   float64
	Duration float64
	Type     string
	Code     string
	Locs     []Stop
	Shape    string
}

func (Legs) Line

func (l Legs) Line() string

type Location

type Location struct {
	LocType     string
	LocTypeID   float64
	Name        string
	MatchedName string
	Lang        string
	City        string
	Coords      string
	Details     *Details
}

type LocationResponse

type LocationResponse []Location

func GetLocation

func GetLocation(loc string) (LocationResponse, bool)

type Route

type Route struct {
	Length   float64
	Duration float64
	Legs     []Legs
}

type RouteResponse

type RouteResponse [][]Route

func GetRoute

func GetRoute(from Location, to Location, time string, date string, optimize string, limit int) RouteResponse

type Stop

type Stop struct {
	Coord       Coord
	ArrTime     string
	DepTime     string
	Name        string
	Code        float64
	ShortCode   string
	StopAddress string
}

Directories

Path Synopsis
Sample text based Reittiopas application
Sample text based Reittiopas application

Jump to

Keyboard shortcuts

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