xkcd-go

Golang tool to read latest, random, or a specific xkcd comic (and download it too).
git clone http://git.hanabi.in/repos/xkcd-go.git
Log | Files | Refs | README | LICENSE

specific-api.go (218B)


      1 package xkcd
      2 
      3 import "fmt"
      4 
      5 // Return link to specific api, to fetch data about the comic numbered num.
      6 func specificAPI(num int) (api string) {
      7 	api = fmt.Sprintf("https://xkcd.com/%d/info.0.json", num)
      8 	return api
      9 }