This repository is unmaintained and deprecated. Use at your own risk; it is likely no longer functional.
Unofficial Wunderlist API client library and CLI, written in golang.
Copyright © 2014-2016, Robert Dimsdale. Licensed under the MIT License.
- The library provides access to all of the endpoints documented in the
official API docs,
plus additional useful methods like
inbox
anddelete-all-tasks
. - The CLI is written in golang, which results in an statically-compiled CLI.
Install the library with:
go get gopkg.in/robdimsdale/wl.v1
or
go get github.com/robdimsdale/wl
Create an instance of wl.Client
using e.g. oauth.NewClient()
as follows:
import (
"fmt"
"github.com/robdimsdale/wl"
"github.com/robdimsdale/wl/logger"
"github.com/robdimsdale/wl/oauth"
)
func main() {
client := oauth.NewClient(
"my_access_token",
"my_client_id",
wl.APIURL,
logger.NewLogger(logger.INFO),
)
// Ignore error
inbox, _ := client.Inbox()
fmt.Printf("Inbox: %v\n", inbox)
}
The code is tested against the latest patch versions of the most recent minor and the previous minor versions of golang.
The develop branch is where active development takes place; it is not guaranteed that any given commit will be stable.
The master branch points to a stable commit. All tests should pass.
A CLI is provided with support for some utility functions (e.g. list all tasks, delete all folders).
Binaries are available on the releases page for various operating systems and architectures.
Download the binary and place in the PATH.
A homebrew tap is available; install the binary with:
brew tap robdimsdale/tap
brew install wl
Access token and client id are required. Provide them via flags (--accessToken
and --clientID
) or with environment variables (WL_ACCESS_TOKEN
or WL_CLIENT_ID
)
$ wl inbox --accessToken my_access_token --clientID my_client_id
id: 123456789
title: inbox
created_at: 2014-08-29T19:45:34.98Z
list_type: inbox
revision: 53538
type: list
public: false
$ WL_ACCESS_TOKEN=my_access_token WL_CLIENT_ID=my_client_id wl create-task --list-id 123456789 --title "some new title"
id: 987654321
[...]
list_id: 123456789
title: some new title
completed: false
The library has no dependencies.
The CLI binary vendors its dependencies in the vendor
directory according
to the golang specification.
Running the tests will require ginkgo.
Execute the unit tests with:
./scripts/unit-tests
The integration tests require the following environment variables to be set:
WL_CLIENT_ID
and WL_ACCESS_TOKEN
.
Values for these are obtained via the method documented at
https://developer.wunderlist.com/documentation/concepts/authorization.
In the cloned directory run the following command:
WL_CLIENT_ID=my_client_id WL_ACCESS_TOKEN=my_access_token ./scripts/integration_tests
- Roadmap: Pivotal Tracker
- CI is performed using Concourse: https://concourse.robdimsdale.com/pipelines/wl