()
| 16 | } |
| 17 | |
| 18 | func newThreadsCommand() *topicCommand { |
| 19 | threadsCommand := &topicCommand{} |
| 20 | threadsCommand.cmd = &cobra.Command{ |
| 21 | Use: "threads <id>", |
| 22 | Short: "Read an email thread", |
| 23 | Annotations: map[string]string{ |
| 24 | "agent_notes": "Returns a thread with all entries. Use entry IDs with hey reply.", |
| 25 | }, |
| 26 | Example: ` hey threads 12345 |
| 27 | hey threads 12345 --json`, |
| 28 | RunE: threadsCommand.run, |
| 29 | Args: usageExactOneArg(), |
| 30 | } |
| 31 | |
| 32 | return threadsCommand |
| 33 | } |
| 34 | |
| 35 | func (c *topicCommand) run(cmd *cobra.Command, args []string) error { |
| 36 | if err := requireAuth(); err != nil { |
no test coverage detected