go-blablacar is a Go client library for accessing the BlaBlaCar API.

Installation

go get github.com/Midneit/go-blablacar

Example

package main

import (
	"context"
	"github.com/Midneit/go-blablacar/blablacar"
	"log"
)

func main() {
	token := "<TOKEN>"
	client := blablacar.NewClient(token)

	search, err := client.Search(context.Background(), &blablacar.SearchRequest{
		FromCoordinate: "55.755826,37.6173",
		ToCoordinate:   "57.626074,39.88447",
	})

	if err != nil {
		log.Fatalln(err)
	}

	log.Println(search)
}

GitHub

https://github.com/Midneit/go-blablacar