@@ -24,6 +24,12 @@ func (d *DisplayConsole) TweetID(tweetID string) string {
24
24
return yellow (tweetID )
25
25
}
26
26
27
+ // ListID is output colored tweet id text
28
+ func (d * DisplayConsole ) ListID (listID string ) string {
29
+ yellow := color .New (color .FgYellow ).SprintFunc ()
30
+ return yellow (listID )
31
+ }
32
+
27
33
// ReplyTo is output colored reply text
28
34
func (d * DisplayConsole ) ReplyTo (tweetID string ) string {
29
35
cyan := color .New (color .FgCyan ).SprintFunc ()
@@ -36,6 +42,12 @@ func (d *DisplayConsole) URL(url string) string {
36
42
return green (url )
37
43
}
38
44
45
+ // Name is output colored name text
46
+ func (d * DisplayConsole ) Name (name string ) string {
47
+ yellow := color .New (color .FgYellow ).SprintFunc ()
48
+ return yellow (name )
49
+ }
50
+
39
51
// ShowTweet is display tweet text
40
52
func (d * DisplayConsole ) ShowTweet (createdAt time.Time , tweetID int64 , screenName string , text string ) {
41
53
fmt .Fprintf (
@@ -49,11 +61,25 @@ func (d *DisplayConsole) ShowTweet(createdAt time.Time, tweetID int64, screenNam
49
61
}
50
62
51
63
// ShowList is display list text
52
- func (d * DisplayConsole ) ShowList (title string , url string ) {
64
+ func (d * DisplayConsole ) ShowList (title string , url string , id int64 ) {
53
65
fmt .Fprintf (
54
66
color .Output ,
55
- "%s\t %s\n " ,
67
+ "%s\t %s\t %s \ n " ,
56
68
d .URL ("https://twitter.com/" + url ),
69
+ d .ListID (strconv .FormatInt (id , 10 )),
57
70
title ,
58
71
)
59
72
}
73
+
74
+ // ShowUser is display user
75
+ func (d * DisplayConsole ) ShowUser (name string , screenName string , url string , friendsCount int , followersCount int ) {
76
+ fmt .Fprintf (
77
+ color .Output ,
78
+ "%s\t %s\t %s\t %s\t %s\n " ,
79
+ d .URL ("https://twitter.com/" + screenName ),
80
+ d .Name (name ),
81
+ d .Name ("@" + screenName ),
82
+ strconv .Itoa (friendsCount ),
83
+ strconv .Itoa (followersCount ),
84
+ )
85
+ }
0 commit comments