Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 1.07 KB

README.md

File metadata and controls

45 lines (34 loc) · 1.07 KB

go-zoom

The zoom packages provides a lightweight Zoom API client. Coverage of available endpoints is minimal, but users.go and meetings.go should act as good examples for implementing support for additional endpoints.

This package is built to be used with Server-to-Server OAuth apps.

Example Usage

package main

import (
	"context"
	"fmt"
	"log"
	"net/http"
	"os"

	"github.com/eleanorhealth/go-zoom/zoom"
)

func main() {
	ctx := context.Background()

	httpClient := &http.Client{}
	client := zoom.NewClient(
		httpClient,
		os.Getenv("ZOOM_ACCOUNT_ID"),
		os.Getenv("ZOOM_CLIENT_ID"),
		os.Getenv("ZOOM_CLIENT_SECRET"),
		nil,
	)

	res, _, err := client.Users.List(ctx, nil)
	if err != nil {
		log.Fatal(err)
	}

	fmt.Printf("%d users\n\n", len(res.Users))

	for _, user := range res.Users {
		fmt.Printf("ID: %s\nDisplay Name: %s\nEmail: %s\n\n", user.ID, user.DisplayName, user.Email)
	}
}