Skip to content

Commit

Permalink
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions examples/agency/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package main

import (
"context"
"fmt"
"log"

onebusaway "github.com/stainless-sdks/open-transit-go"
"github.com/stainless-sdks/open-transit-go/option"
)

func main() {

// Initialize the OneBusAway client with the API key
client := onebusaway.NewClient(
option.WithAPIKey("TEST"),
)

ctx := context.Background()
agencies, err := client.AgenciesWithCoverage.List(ctx)
if err != nil {
log.Fatalf("Error fetching agencies: %v", err)
}

fmt.Print(agencies.Data.List[0].JSON.RawJSON())
}

0 comments on commit 30741c6

Please sign in to comment.