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