Created
November 22, 2019 05:28
-
-
Save nikukyugamer/faef52082440d897f246084a8ee3b424 to your computer and use it in GitHub Desktop.
nlopes/slack を使って Slack からユーザ情報を取得する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/nlopes/slack" | |
) | |
func main() { | |
api := slack.New("xoxp-12345-12345-12345-abcdef-abcdef") | |
user, err := api.GetUserInfo("?1?1?1?11?") | |
if err != nil { | |
fmt.Printf("%s\n", err) | |
return | |
} | |
fmt.Printf("ID: %s, Fullname: %s, Email: %s\n", user.ID, user.Profile.RealName, user.Profile.Email) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment