{"id":24294394,"url":"https://github.com/go-api-libs/cat-facts","last_synced_at":"2026-04-22T10:04:27.885Z","repository":{"id":272465271,"uuid":"906935244","full_name":"go-api-libs/cat-facts","owner":"go-api-libs","description":"Go library for the Cat Fact API. An API that shows different Cat Facts!","archived":false,"fork":false,"pushed_at":"2025-01-19T19:24:48.000Z","size":921,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-06T06:16:03.380Z","etag":null,"topics":["api","api-client","api-library","cat-facts","cat-facts-api","catfacts","go","golang","integration","joke","joke-api","openapi","openapi3"],"latest_commit_sha":null,"homepage":"","language":null,"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/go-api-libs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-22T11:01:06.000Z","updated_at":"2025-01-19T19:24:50.000Z","dependencies_parsed_at":"2025-01-14T17:00:06.163Z","dependency_job_id":"a0efd69e-0d20-4af8-b605-b969573d7a24","html_url":"https://github.com/go-api-libs/cat-facts","commit_stats":null,"previous_names":["go-api-libs/cat-facts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/go-api-libs/cat-facts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-api-libs%2Fcat-facts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-api-libs%2Fcat-facts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-api-libs%2Fcat-facts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-api-libs%2Fcat-facts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-api-libs","download_url":"https://codeload.github.com/go-api-libs/cat-facts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-api-libs%2Fcat-facts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32130793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T08:34:57.708Z","status":"ssl_error","status_checked_at":"2026-04-22T08:34:55.583Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","api-client","api-library","cat-facts","cat-facts-api","catfacts","go","golang","integration","joke","joke-api","openapi","openapi3"],"created_at":"2025-01-16T17:39:08.649Z","updated_at":"2026-04-22T10:04:27.850Z","avatar_url":"https://github.com/go-api-libs.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 😽 Cat Fact API\n[![Go Reference](https://pkg.go.dev/badge/github.com/go-api-libs/cat-facts.svg)](https://pkg.go.dev/github.com/go-api-libs/cat-facts/pkg/catfacts)\n[![Official Documentation](https://img.shields.io/badge/docs-API-blue)](https://alexwohlbruck.github.io/cat-facts/docs/)\n[![OpenAPI](https://img.shields.io/badge/OpenAPI-3.1-blue)](/api/openapi.json)\n[![Go Report Card](https://goreportcard.com/badge/github.com/go-api-libs/cat-facts)](https://goreportcard.com/report/github.com/go-api-libs/cat-facts)\n![Code Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)\n![API Health](https://img.shields.io/badge/API_health-89%25-green)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)\n\nAn API that shows different Cat Facts! ([Source](https://freepublicapis.com/cat-fact-api))\n\n## Installation\n\nTo install the library, use the following command:\n\n```shell\ngo get github.com/go-api-libs/cat-facts/pkg/catfacts\n```\n\n## Usage\n\n### Example 1: Get random animal facts\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\n\t\"github.com/go-api-libs/cat-facts/pkg/catfacts\"\n)\n\nfunc main() {\n\tc, err := catfacts.NewClient()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tctx := context.Background()\n\tfacts, err := c.GetRandom(ctx, catfacts.GetRandomParams{\n\t\tAmount:     2,\n\t\tAnimalType: \"cat\",\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Use facts slice\n}\n\n```\n\n### Example 2: Get a fact by its ID\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\n\t\"github.com/go-api-libs/cat-facts/pkg/catfacts\"\n)\n\nfunc main() {\n\tc, err := catfacts.NewClient()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tctx := context.Background()\n\tfact, err := c.GetFactByID(ctx, \"591f9890d369931519ce3564\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Use fact object\n}\n\n```\n\n## Additional Information\n\n- [**Go Reference**](https://pkg.go.dev/github.com/go-api-libs/cat-facts/pkg/catfacts): The Go reference documentation for the client package.\n- [**Official Documentation**](https://alexwohlbruck.github.io/cat-facts/docs/): The official API documentation.\n- [**OpenAPI Specification**](./api/openapi.json): The OpenAPI 3.1.0 specification.\n- [**Go Report Card**](https://goreportcard.com/report/github.com/go-api-libs/cat-facts): Check the code quality report.\n\n## Contributing\n\nIf you have any contributions to make, please submit a pull request or open an issue on the [GitHub repository](https://github.com/go-api-libs/cat-facts).\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-api-libs%2Fcat-facts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-api-libs%2Fcat-facts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-api-libs%2Fcat-facts/lists"}