29 lines
513 B
Markdown
29 lines
513 B
Markdown
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
"github.com/appwrite/sdk-for-go"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
// Create a Client
|
||
|
var client := appwrite.Client{}
|
||
|
|
||
|
// Set Client required headers
|
||
|
client.SetProject("")
|
||
|
client.SetKey("")
|
||
|
|
||
|
// Create a new Teams service passing Client
|
||
|
var srv := appwrite.Teams{
|
||
|
client: &client
|
||
|
}
|
||
|
|
||
|
// Call CreateTeam method and handle results
|
||
|
var res, err := srv.CreateTeam("[NAME]")
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
|
||
|
fmt.Println(res)
|
||
|
}
|