You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
664 B

  1. package main
  2. import (
  3. "fmt"
  4. "strconv"
  5. "github.com/dghubble/go-twitter/twitter"
  6. )
  7. func analyzeUserAccount(client *twitter.Client, username string) {
  8. user, _, err := client.Users.Show(&twitter.UserShowParams{
  9. ScreenName: username,
  10. })
  11. if err != nil {
  12. fmt.Println(err)
  13. }
  14. fmt.Print("User created at: ")
  15. c.Cyan(user.CreatedAt)
  16. fmt.Print("email: ")
  17. c.Cyan(user.Email)
  18. fmt.Print("Following count: ")
  19. c.Cyan(strconv.Itoa(user.FriendsCount))
  20. fmt.Print("Followers count: ")
  21. c.Cyan(strconv.Itoa(user.FollowersCount))
  22. fmt.Print("Location: ")
  23. c.Cyan(user.Location)
  24. fmt.Print("Timezone: ")
  25. c.Cyan(user.Timezone)
  26. fmt.Println("")
  27. fmt.Println("")
  28. }