Debian Codegraph @

examples/team/team.go

raw symbols SCIP
1 package main
2
3 import (
4 "fmt"
5
6 "github.com/slack-go/slack"
7 )
8
9 func main() {
10 api := slack.New("YOUR_TOKEN_HERE")
11 //Example for single user
12 billingActive, err := api.GetBillableInfo("U023BECGF")
13 if err != nil {
14 fmt.Printf("%s\n", err)
15 return
16 }
17 fmt.Printf("ID: U023BECGF, BillingActive: %v\n\n\n", billingActive["U023BECGF"])
18
19 //Example for team
20 billingActiveForTeam, _ := api.GetBillableInfoForTeam()
21 for id, value := range billingActiveForTeam {
22 fmt.Printf("ID: %v, BillingActive: %v\n", id, value)
23 }
24
25 }