Files
imap2asana/imap2asana.go

36 lines
426 B
Go
Raw Normal View History

2022-10-30 20:31:51 +00:00
package main
import (
"fmt"
"os"
)
func main() {
ic, err := NewImapClient(
os.Getenv("IMAP_HOST"),
os.Getenv("IMAP_USERNAME"),
os.Getenv("IMAP_PASSWORD"),
2022-10-30 22:23:45 +00:00
"Asana",
"Archive",
2022-10-30 20:31:51 +00:00
)
if err != nil {
panic(err)
}
defer ic.Close()
2022-10-30 22:23:45 +00:00
tasks, err := ic.Poll()
2022-10-30 20:31:51 +00:00
if err != nil {
panic(err)
}
2022-10-30 22:23:45 +00:00
for _, task := range tasks {
fmt.Printf("%#v\n", task)
2022-10-30 20:31:51 +00:00
}
}
2022-10-30 22:23:45 +00:00
type Task struct {
Name string
HtmlNotes string
2022-10-30 20:31:51 +00:00
}