dex/vendor/google.golang.org/api/examples/tasks.go

23 lines
465 B
Go
Raw Normal View History

2016-04-09 00:26:29 +05:30
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, _ := 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)
}