daily-go

module
v0.0.0-...-7f9836d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2023 License: BSD-3-Clause

README

daily-go

Build and test codecov

daily-go is a Go library to communicate with Daily's REST API.

Usage

Run go get github.com/lazeratops/daily-go

import (
    "fmt"
    "github.com/lazeratops/daily-go/daily"
    "github.com/lazeratops/daily-go/daily/room"
)

func main() {
    d, err := daily.NewDaily("YOUR_DAILY_API_KEY")
    if err != nil {
        panic(err)
    }
	
    // Create a room
    r, err := d.CreateRoom(room.CreateParams{
        Name:            "roomName",
        IsPrivate:       true,
        Props:           room.RoomProps{
            MaxParticipants: 2,
        },
    })
	
    if err != nil {
        panic(err)
    }

    // Get existing rooms
    rooms, err := d.GetRooms(&room.GetManyParams{
        Limit: 5,
    })
	
    if err != nil {
        panic(err)
    }
    
    fmt.Println(len(rooms))
}

Directories

Path Synopsis
cmd
Package daily handles communication with the Daily REST API
Package daily handles communication with the Daily REST API

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL