Skip to content

iterate/whereby-api-go

Repository files navigation

whereby-api-go

A Whereby API client for Go.

See the pkg.go.dev for more documentation for this module.

Installation

go get github.com/iterate/whereby-api-go

Usage

package main

import (
	"context"
	"fmt"
	"log"
	"os"
	"time"

	"github.com/iterate/whereby-api-go"
)

func main() {
	wb := whereby.NewClient(os.Getenv("WHEREBY_API_KEY"))

	meeting, err := wb.CreateMeeting(context.Background(), whereby.CreateMeetingInput{
		End: time.Now().Add(time.Hour),
	})

	if err != nil {
		log.Printf("Something went wrong: %v\n", err)
	}

	fmt.Println(meeting.URL)
}

Contributing

You may run a simple functional test by passing the functional tag to go test and setting the -whereby-api-key flag:

go test ./... -tags functional -whereby-api-key key

Legal

Copyright (c) 2020 Mindcare AS.

Developed by Iterate.

Licensed under the MIT license.