go-xkcd alternatives and similar packages
Based on the "Third-party APIs" category.
Alternatively, view go-xkcd alternatives based on common mentions on social networks and blogs.
-
githubql
Package githubv4 is a client library for accessing GitHub GraphQL API v4 (https://docs.github.com/en/graphql). -
openaigo
OpenAI GPT3/3.5 and GPT4 ChatGPT API Client Library for Go, simple, less dependencies, and well-tested -
gostorm
GoStorm is a Go library that implements the communications protocol required to write Storm spouts and Bolts in Go that communicate with the Storm shells.
InfluxDB - Purpose built for real-time analytics at any scale.
Do you think we are missing an alternative of go-xkcd or a related project?
Popular Comparisons
README
go-xkcd
HTTP Client for the xkcd API.
Details on the xkcd API can be found here.
Install
Outside a project using go modules, get the latest version by running:
go get github.com/nishanths/go-xkcd
Inside a project using go modules, use:
go get github.com/nishanths/go-xkcd@latest
Example
The following program prints details about xkcd.com/599:
package main
import (
"context"
"fmt"
"log"
"github.com/nishanths/go-xkcd/v2"
)
func main() {
client := xkcd.NewClient()
comic, err := client.Get(context.Background(), 599)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s: %s\n", comic.Title, comic.ImageURL) // Apocalypse: http://imgs.xkcd.com/comics/apocalypse.png
}
Test
To run tests:
$ go test -race
Godoc
https://godoc.org/github.com/nishanths/go-xkcd
License
The MIT License. Copyright © Nishanth Shanmugham.
*Note that all licence references and agreements mentioned in the go-xkcd README section above
are relevant to that project's source code only.