Exemplo n.º 1
0
func GetMonologueTweetByName(name string) tweet.Tweet {
	return tweet.New(
		"",
		pickUpRandom(monologues[name]),
		tweet.TypeMonologue,
	)
}
Exemplo n.º 2
0
func (c Tweet) Sortie(finish_time int64, screen_name, message, client_token string) revel.Result {
	if ok, errorMess := c.validate(screen_name, message, client_token); !ok {
		return c.RenderJson(&map[string]string{
			"result":  "ng",
			"message": errorMess,
		})
	}
	q := queue.New(
		finish_time,
		tweet.New(screen_name, message, tweet.TypeSortie),
	)
	queue.Enq(q)
	return c.RenderJson(&map[string]string{
		"result":  "ok",
		"message": message,
	})
}