diff options
author | Wim <wim@42.be> | 2017-03-25 20:45:10 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2017-03-25 20:45:10 +0100 |
commit | 07fd825349e8b7e86f8afb3843cb8e2c2afc7c74 (patch) | |
tree | ea4b33872a5b925fa0ecd2b421f8f073ba22b2cc /vendor/github.com/nlopes/slack/examples/team | |
parent | be15cc8a36ed3c207251f9b92815781f2fa8618d (diff) | |
download | matterbridge-msglm-07fd825349e8b7e86f8afb3843cb8e2c2afc7c74.tar.gz matterbridge-msglm-07fd825349e8b7e86f8afb3843cb8e2c2afc7c74.tar.bz2 matterbridge-msglm-07fd825349e8b7e86f8afb3843cb8e2c2afc7c74.zip |
Update vendor
Diffstat (limited to 'vendor/github.com/nlopes/slack/examples/team')
-rw-r--r-- | vendor/github.com/nlopes/slack/examples/team/team.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vendor/github.com/nlopes/slack/examples/team/team.go b/vendor/github.com/nlopes/slack/examples/team/team.go new file mode 100644 index 00000000..38223d86 --- /dev/null +++ b/vendor/github.com/nlopes/slack/examples/team/team.go @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + + "github.com/nlopes/slack" +) + +func main() { + api := slack.New("YOUR_TOKEN_HERE") + //Example for single user + billingActive, err := api.GetBillableInfo("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, err := api.GetBillableInfoForTeam() + for id, value := range billingActiveForTeam { + fmt.Printf("ID: %v, BillingActive: %v\n", id, value) + } + +} |