registry/vendor/google.golang.org/api/examples/tasks.go
Olivier Gambier 77e69b9cf3 Move to vendor
Signed-off-by: Olivier Gambier <olivier@docker.com>
2016-03-22 10:45:49 -07:00

26 lines
544 B
Go

package main
import (
"log"
"net/http"
tasks "google.golang.org/api/tasks/v1"
)
func init() {
registerDemo("tasks", tasks.TasksScope, tasksMain)
}
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)
}