diff --git a/cmd/main/main.go b/cmd/cron/main.go similarity index 100% rename from cmd/main/main.go rename to cmd/cron/main.go diff --git a/cmd/develop/main.go b/cmd/develop/main.go index 37ee46d..e0448c1 100644 --- a/cmd/develop/main.go +++ b/cmd/develop/main.go @@ -1,9 +1,10 @@ -package develop +package main import ( "fmt" "internal/api" "os" + "time" "github.com/joho/godotenv" ) @@ -29,14 +30,21 @@ func main() { // } client = api.NewSyncClient(os.Getenv("TODOIST_API_KEY")) - client.Synchronize(true) + client.UseResources(api.Items) for { - changes, err := client.Synchronize(false) + _, err := client.Synchronize(false) + + fmt.Printf("Items: %d\n", len(client.State.Items)) + for _, item := range client.State.Items { + fmt.Println(item) + } if err != nil { fmt.Println("Error syncing:", err) os.Exit(1) } + + time.Sleep(30 * time.Second) } }