{"id":15649212,"url":"https://github.com/nanmu42/qrcode-api","last_synced_at":"2025-04-30T16:11:41.910Z","repository":{"id":70181224,"uuid":"154842569","full_name":"nanmu42/qrcode-api","owner":"nanmu42","description":":horse: A simple API service for QR Code generation/recognition | 二维码生成/识别API","archived":false,"fork":false,"pushed_at":"2023-02-14T03:08:38.000Z","size":45,"stargazers_count":40,"open_issues_count":0,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T17:46:08.848Z","etag":null,"topics":["api","golang","qrcode","qrcode-generator","qrcode-reader","qrcode-scanner","zbar"],"latest_commit_sha":null,"homepage":"","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/nanmu42.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"nanmu42"}},"created_at":"2018-10-26T13:55:04.000Z","updated_at":"2024-05-19T05:52:11.000Z","dependencies_parsed_at":"2023-02-21T11:46:11.889Z","dependency_job_id":null,"html_url":"https://github.com/nanmu42/qrcode-api","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/nanmu42%2Fqrcode-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanmu42%2Fqrcode-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanmu42%2Fqrcode-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanmu42%2Fqrcode-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nanmu42","download_url":"https://codeload.github.com/nanmu42/qrcode-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251739653,"owners_count":21635892,"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":["api","golang","qrcode","qrcode-generator","qrcode-reader","qrcode-scanner","zbar"],"created_at":"2024-10-03T12:28:54.200Z","updated_at":"2025-04-30T16:11:41.859Z","avatar_url":"https://github.com/nanmu42.png","language":"Go","funding_links":["https://github.com/sponsors/nanmu42"],"categories":[],"sub_categories":[],"readme":"# QR Code API\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/nanmu42/qrcode-api)](https://goreportcard.com/report/github.com/nanmu42/qrcode-api)\n[![GoDoc](https://godoc.org/github.com/nanmu42/qrcode-api?status.svg)](https://godoc.org/github.com/nanmu42/qrcode-api)\n[![Docker Image](https://img.shields.io/badge/Docker-image-blue.svg)](https://hub.docker.com/r/nanmu42/qrcode-api/)\n\nA simple API service for QR Code generation/recognition.\n\nThis project provide Bearychat integration.\n\n# API Doc\n\n## Encoding\n\nRequest:\n\n```\nGET /encode?content=helloWorld\u0026size=400\u0026type=png\n```\n\nParams:\n\n* `content` required\n* `size` QR Code size in pixel, may not be honored\n* `type` `png`(default) or `string`\n\nResponse:\n\n* HTTP status 200 OK\n\nA `image/png` or plain text(`type=string`).\n\n* HTTP status 400 Bad Request\n\nCheck your params.\n\n* HTTP status 500\n\nSomething unexpected happened.\n\n## Decoding\n\nRequest:\n\n```\nPOST /decode\n```\n\nParams: image as binary body\n\nResponse:\n\n* HTTP status 200 OK\n\nGood decoding:\n\n```json\n{\n    \"ok\": true,\n    \"desc\": \"\",\n    \"content\": [\n        \"你好\"\n    ]\n}\n```\n\nEverything is ok, but nothing recognized:\n\n```json\n{\n    \"ok\": true,\n    \"desc\": \"\",\n    \"content\": null\n}\n```\n\nSomething is wrong:\n\n```json\n{\n    \"ok\": false,\n    \"desc\": \"file decoding error: image: unknown format\",\n    \"content\": null\n}\n```\n\n* HTTP status 413 Request Entity Too Large\n\nRequest Body is too large.\n\n* HTTP status 500\n\nSomething unexpected happened.\n\n# Docker Image\n\nThere is a [pre-compiled Docker image](https://hub.docker.com/r/nanmu42/qrcode-api/)\nalone with C++ dependencies(ZBar), you may pull the image like following:\n\n```bash\ndocker pull nanmu42/qrcode-api\n```\n\nSee `Docker` directory for `docker-compose.yaml` and more detail.\n\n# Build and Run\n\nIf you'd like to get you hands dirty, you can build this project as following:\n\nDownload and compile ZBar for shared dependencies:\n\n```bash\nwget https://downloads.sourceforge.net/project/zbar/zbar/0.10/zbar-0.10.tar.bz2\n# or, if you are suffering decoding troubles on UTF-8, try this modified version:\n# wget https://github.com/nanmu42/zbar-utf8/archive/master.zip\ntar -xf zbar-0.10.tar.bz2\ncd zbar-0.10\nexport CFLAGS=\"\"\n./configure --disable-video --without-imagemagick --without-qt --without-python --without-gtk --without-x --disable-pthread\nmake install\n```\n\nGo to `cmd/api` or `cmd/bearychat` for further instruction, more details are in README.md there.\n\n# License\n\nCopyright (c) 2018 LI Zhennan\n\nUse of this work is governed by an MIT License.\nYou may find a license copy in project root.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanmu42%2Fqrcode-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnanmu42%2Fqrcode-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanmu42%2Fqrcode-api/lists"}