A scuffed website to display random pictures of random cats of people who contribute to it. No NFTs... yet.
Find a file
NotAShelf c8e8f5467a
Some checks failed
Go / build (push) Has been cancelled
ci: fix build?
2025-02-11 00:39:52 +03:00
.github/workflows ci: fix build? 2025-02-11 00:39:52 +03:00
images Delete images/20231009_035703.jpg 2023-10-31 10:53:01 +00:00
vendor bump dependencies 2025-02-08 16:33:02 +03:00
.editorconfig meta: integrate editorconfig 2025-02-10 05:29:09 +03:00
.envrc feat: nix tooling 2023-10-26 19:39:06 +03:00
.gitattributes docs: update usage instructions 2023-10-27 10:48:26 +03:00
.gitignore ignore production config 2025-02-11 00:39:04 +03:00
default.nix feat: nix tooling 2023-10-26 19:39:06 +03:00
example.config.yml allow customizing header and title 2025-02-11 00:38:32 +03:00
flake.lock feat: nix tooling 2023-10-26 19:39:06 +03:00
flake.nix feat: nix tooling 2023-10-26 19:39:06 +03:00
go.mod bump dependencies 2025-02-08 16:33:02 +03:00
go.sum bump dependencies 2025-02-08 16:33:02 +03:00
LICENSE we license these 2022-01-25 02:09:14 +03:00
main.go allow customizing header and title 2025-02-11 00:38:32 +03:00
README.md docs: update README 2025-02-10 05:32:28 +03:00
shell.nix feat: nix tooling 2023-10-26 19:39:06 +03:00
test.sh rewrite in go 2023-10-27 10:01:55 +03:00

🐾 catApi

catApi is a minimal, self-hostable API (and frontend) for serving pictures of... you guessed, it cats! Who doesn't like cats?

API Documentation

There are several API endpoints that you may query.

/api/id

/api/id will return the image with the associated ID.

For example http://localhost:3000/api/id?id=3 will return the image with the ID of "3".

/api/list

/api/list will return return a JSON object containing data about the images within the /images directory

For example, querying http://localhost:3000/api/random will return a JSON object that might be as follows

[
  { "filename": "0.jpg", "id": "0", "url": "/api/id?id=0" },
  { "filename": "1.jpg", "id": "1", "url": "/api/id?id=1" },
  { "filename": "10.jpg", "id": "2", "url": "/api/id?id=2" },
  { "filename": "11.jpg", "id": "3", "url": "/api/id?id=3" }
]

/api/random

/api/random will return a random image from the list of available images

License

catApi is licensed under the MIT License