diff --git a/examples/team/team.go b/examples/team/team.go index 8d2fcdbc6..cba71aa74 100644 --- a/examples/team/team.go +++ b/examples/team/team.go @@ -9,17 +9,16 @@ import ( func main() { api := slack.New("YOUR_TOKEN_HERE") //Example for single user - billingActive, err := api.GetBillableInfo("U023BECGF") + billingActive, err := api.GetBillableInfo(slack.GetBillableInfoParams{User: "U023BECGF"}) if err != nil { fmt.Printf("%s\n", err) return } fmt.Printf("ID: U023BECGF, BillingActive: %v\n\n\n", billingActive["U023BECGF"]) - //Example for team - billingActiveForTeam, _ := api.GetBillableInfoForTeam() + //Example for team. Note: passing empty TeamID just uses the current user team. + billingActiveForTeam, _ := api.GetBillableInfo(slack.GetBillableInfoParams{}) for id, value := range billingActiveForTeam { fmt.Printf("ID: %v, BillingActive: %v\n", id, value) } - } diff --git a/slacktest/handlers_test.go b/slacktest/handlers_test.go index dec4c99be..8ccb704cd 100644 --- a/slacktest/handlers_test.go +++ b/slacktest/handlers_test.go @@ -117,7 +117,7 @@ func TestBotInfoHandler(t *testing.T) { go s.Start() client := slack.New("ABCDEFG", slack.OptionAPIURL(s.GetAPIURL())) - bot, err := client.GetBotInfo(s.BotID) + bot, err := client.GetBotInfo(slack.GetBotInfoParameters{Bot: s.BotID}) assert.NoError(t, err) assert.Equal(t, s.BotID, bot.ID) assert.Equal(t, s.BotName, bot.Name)