use for my personal website.
check godoc or read the code
go get -u github.com/hechen0/wunderlist
in your project
import "github.com/hechen0/wunderlist"
client := Wunderlist.NewClient()
the auth token is represented by a Auth struct in this package.
type Auth struct {
Token string
ClientId string
}
auth := &wunderlist.Auth{Token: "xxx", ClientId: "xxx"}
client.SetAuth(auth)
list, err := client.Lists.All(context.Background())
if err != nil {
fmt.Printf("got error: %v", err)
}
basically, the context package provide a union method to cancel a request, whether a user cancel a request explicitly or you set a timeline, and the request exceed the timeline etc, the resource that associated with that canceled request will be released immediately,so you have more control over your request. for more infomation: check context
the wunderlist api support a simple oauth2 service, so you can register your app at https://developer.wunderlist.com, then get the token use a oatuh2 library, or by hand :) .
first, i just wanna collect all my todo data, so i write a simple get request to retrieve all my todo data, but as time goes by, the simple get request grow bigger and bigger cause i need more detaild about my data, such as my file, my note, my reminder, so one day, i decide to write a full fuctional wunderlist api client.
only for personal use, for commercial use, please contact me at me#hechen0.com