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.

29 lines
554 B

  1. package main
  2. import (
  3. "bufio"
  4. "fmt"
  5. "os"
  6. "strings"
  7. "github.com/dghubble/go-twitter/twitter"
  8. )
  9. func getUser(client *twitter.Client) {
  10. newcommand := bufio.NewReader(os.Stdin)
  11. fmt.Print("enter username: @")
  12. username, _ := newcommand.ReadString('\n')
  13. username = strings.TrimSpace(username)
  14. fmt.Println("user selected: " + username)
  15. fmt.Println("-----------------------")
  16. tweets, _, _ := client.Timelines.UserTimeline(&twitter.UserTimelineParams{
  17. ScreenName: username,
  18. Count: 200,
  19. })
  20. analyzeWords(tweets)
  21. analyzeDates(tweets)
  22. }