Skip to content

lazeratops/daily-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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))
}

About

A Go library to communicate with the Daily REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published