{"id":13414043,"url":"https://github.com/nishanths/go-xkcd","last_synced_at":"2025-03-16T20:31:44.823Z","repository":{"id":57486943,"uuid":"52580351","full_name":"nishanths/go-xkcd","owner":"nishanths","description":"xkcd.com API client in Go","archived":false,"fork":false,"pushed_at":"2022-10-23T01:37:07.000Z","size":98,"stargazers_count":51,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-12T18:42:05.463Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/nishanths/go-xkcd/v2","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nishanths.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-26T05:14:31.000Z","updated_at":"2024-06-13T21:20:28.000Z","dependencies_parsed_at":"2022-09-02T00:02:40.121Z","dependency_job_id":null,"html_url":"https://github.com/nishanths/go-xkcd","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishanths%2Fgo-xkcd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishanths%2Fgo-xkcd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishanths%2Fgo-xkcd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishanths%2Fgo-xkcd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nishanths","download_url":"https://codeload.github.com/nishanths/go-xkcd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830922,"owners_count":20354850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T20:01:56.099Z","updated_at":"2025-03-16T20:31:44.455Z","avatar_url":"https://github.com/nishanths.png","language":"Go","funding_links":[],"categories":["Third-party APIs","Utility","第三方api","第三方API","\u003cspan id=\"第三方api-third-party-apis\"\u003e第三方API Third-party APIs\u003c/span\u003e","第三方API`第三方API 汇总`"],"sub_categories":["HTTP Clients","Utility/Miscellaneous","Advanced Console UIs","Fail injection","实用程序/Miscellaneous","查询语","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","交流"],"readme":"# go-xkcd\n\nHTTP Client for the xkcd API.\n\n[![wercker status](https://app.wercker.com/status/6c1de0bfd64a428d6ece5a2337268160/s \"wercker status\")](https://app.wercker.com/project/bykey/6c1de0bfd64a428d6ece5a2337268160) [![Coverage Status](https://coveralls.io/repos/github/nishanths/go-xkcd/badge.svg?branch=master)](https://coveralls.io/github/nishanths/go-xkcd?branch=master)\n[![GoDoc](https://godoc.org/github.com/nishanths/go-xkcd?status.svg)](https://godoc.org/github.com/nishanths/go-xkcd)\n\n[\u003cimg alt=\"https://xkcd.com/1481/\" title=\"https://xkcd.com/1481/\" src=\"http://imgs.xkcd.com/comics/api.png\" width=\"250\"\u003e](https://xkcd.com/1481/)\n\nDetails on the xkcd API can be found [here](https://xkcd.com/json.html).\n\n## Install\n\nOutside a project using go modules, get the latest version by running:\n\n```\ngo get github.com/nishanths/go-xkcd\n```\n\nInside a project using go modules, use:\n\n```\ngo get github.com/nishanths/go-xkcd/v2\n```\n\n## Example\n\nThe following program prints details about [xkcd.com/599](http://xkcd.com/599):\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"fmt\"\n    \"log\"\n\n    \"github.com/nishanths/go-xkcd/v2\"\n)\n\nfunc main() {\n    client := xkcd.NewClient()\n\n    comic, err := client.Get(context.Background(), 599)\n    if err != nil {\n        log.Fatal(err)\n    }\n    fmt.Printf(\"%s: %s\\n\", comic.Title, comic.ImageURL) // Apocalypse: http://imgs.xkcd.com/comics/apocalypse.png\n}\n```\n\n## Test\n\nTo run tests:\n\n```\n$ go test -race\n```\n\n## Godoc\n\nhttps://godoc.org/github.com/nishanths/go-xkcd\n\n## License\n\nThe [MIT License](http://nishanths.mit-license.org). Copyright © [Nishanth Shanmugham](https://github.com/nishanths).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishanths%2Fgo-xkcd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnishanths%2Fgo-xkcd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishanths%2Fgo-xkcd/lists"}