This project is really early and figuring out its identity. Don't expect a stable (Go) API at the moment.
Todoist is a Go (Golang) wrapper and SDK for the official Todoist API.
A basic CLI is also included.
The CLI is and will remain fairly basic. It is meant to test this library, not really for end users.
- Implement the minimum functionality needed to support the Todoist module in wtfutil/wtf.
- All task endpoints supported.
- Sync endpoint supported.
- Other endpoints supported.
- The minimum Go version supported is v1.25.
- A Todoist account will be needed.
Big League Stats is a Go module so the best way to use it is to add an import in the file you want to use it in and then run go mod tidy to get it downloaded.
import(
"github.com/gopherlibs/big-league-stats/mlb"
)Alternatively, you can run go get github.com/gopherlibs/big-league-stats/mlb in your project directory.
In short, you create a new instance of the client, authenticate with it, and then call methods that return the objects you'd like.
Here's an example of getting a slice of tasks.
package main
import (
"fmt"
"github.com/gopherlibs/todoist/api"
)
func main() {
c := api.New(os.Getenv("TODOIST_TOKEN"))
tasks, err := c.Tasks(args[0])
if err != nil {
fmt.Printf("Running 'Tasks' failed. Err: %s\n", err.Error())
return err
}
for _, t := range tasks.Results {
fmt.Printf("- %s - %s\n", t.Content, t.ID)
}
}This library is written and tested with Go v1.25+ in mind.
go fmt is your friend.
Please feel free to open Issues and PRs are you see fit.
Any PR that requires a good amount of work or is a significant change, it would be best to open an Issue to discuss the change first.
This module was written by Ricardo N Feliciano (FelicianoTech). This repository is licensed under the MIT license. This repo's license can be found here.