A Go library for the tldr.io API.
Go
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.travis.yml
LICENSE
README.md
categories.go
categories_test.go
tldrio.go
tldrio_test.go
tldrs.go
tldrs_test.go
users.go
users_test.go

README.md

tldriogo

A Go library for the tldr.io API.

Build Status

Overview

tldriogo is a client library for the tl;dr API. It currently supports all 6 API calls.

Summary

var tldrio *TldrIo
tldrio = NewTldrIo()

categories, err := tldrio.Categories()
// &[{Name:Tech News Slug:tech-news} {Name:World News Slug:world-news} ...]

// Get the three latest World News TL;DRs 
latest, err := tldrio.Latest(3, "world-news")

// Search for a TL;DR for a particular URL
result, err := tldrio.Search("http://i.want.a.summary")

// Search for a bunch of TL;DRs
results, err := tldrio.SearchBatch("http://i.want.a.summary", "http://and.another")

// Get the scoop on a TL;DR user
user, err := tldrio.User("fredjonez")

// See all of fredjonez TL;DRs
results, err := tldrio.UserTldrs("fredjonez")

Docs

See the godoc at http://godoc.org/github.com/joshrotenberg/tldriogo and the API docs at http://tldr.io/api-documentation for more information.