Exemple #1
0
func tasksMain(client *http.Client, argv []string) {
	taskapi, _ := tasks.New(client)
	task, err := taskapi.Tasks.Insert("@default", &tasks.Task{
		Title: "finish this API code generator thing",
		Notes: "ummmm",
		Due:   "2011-10-15T12:00:00.000Z",
	}).Do()
	log.Printf("Got task, err: %#v, %v", task, err)
}
Exemple #2
0
func tasksMain(client *http.Client, argv []string) {
	taskapi, err := tasks.New(client)
	if err != nil {
		log.Fatalf("Unable to create Tasks service: %v", err)
	}

	task, err := taskapi.Tasks.Insert("@default", &tasks.Task{
		Title: "finish this API code generator thing",
		Notes: "ummmm",
		Due:   "2011-10-15T12:00:00.000Z",
	}).Do()
	log.Printf("Got task, err: %#v, %v", task, err)
}