예제 #1
0
파일: mine.go 프로젝트: ch0wdan/rowdy-bot
func MinePeople(s *session.Session) {
	// Set up channel
	next := make(chan *http.Users)
	var batch http.Users

	if s.GetNext() == "" {
		if s.GetState() > 0 {
			s.IncrementStep()
		}
		if s.GetLearningStep() == utils.APPRAISE {
			batch = http.GetFollowers(s)
		} else {
			batch = http.GetFollowing(s)
		}
	} else {
		batch = http.GetNext(s, s.GetNext())
	}

	go listen(s, next, 0, s.IncrementState())
	next <- &batch
}