Skip to content

Commit

Permalink
pr-prep
Browse files Browse the repository at this point in the history
  • Loading branch information
candiduslynx committed Apr 26, 2024
1 parent ceced00 commit c530ebb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions examples/team/team.go
Expand Up @@ -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)
}

}
2 changes: 1 addition & 1 deletion slacktest/handlers_test.go
Expand Up @@ -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)
Expand Down

0 comments on commit c530ebb

Please sign in to comment.