Skip to content

yageek/tlgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tlgo

A Go package to query TL rest API.

Installation

go get github.com/gophersch/tlgo

Usage

package main

import (
    "github.com/gophersch/tlgo"
    "fmt"
)

func main() {

    // Get a Client instance
    client := tlgo.NewClient()
	lines, err := client.ListLines()
	if err != nil {
		fmt.Printf("Can not get line lists: %s\n", err)
	}

	_, err = client.ListRoutes(lines[0].ID)
	if err != nil {
		fmt.Printf("Can not get routes list: %s\n", err)
	}

	details, err := client.ListStopDepartures("1970329131941987", "11822125115506799", time.Now(), false)
	if err != nil {
		fmt.Printf("Can not get details list: %s\n", err)
	}

	fmt.Printf("Details: %+v\n", details)

About

🚌 Golang client for the TL API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages