{"id":15471030,"url":"https://github.com/bu/copicake-go","last_synced_at":"2025-03-28T12:44:22.917Z","repository":{"id":137327727,"uuid":"595676174","full_name":"bu/copicake-go","owner":"bu","description":"Golang SDK for Copicake service","archived":false,"fork":false,"pushed_at":"2023-02-06T18:54:37.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-19T01:14:23.961Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bu.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":"2023-01-31T15:28:33.000Z","updated_at":"2023-02-01T01:27:06.000Z","dependencies_parsed_at":"2023-04-24T13:51:45.535Z","dependency_job_id":null,"html_url":"https://github.com/bu/copicake-go","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"197f102ee271bd6947ad166139d13dd9c1cb1674"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bu%2Fcopicake-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bu%2Fcopicake-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bu%2Fcopicake-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bu%2Fcopicake-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bu","download_url":"https://codeload.github.com/bu/copicake-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246034280,"owners_count":20712851,"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-10-02T02:08:24.948Z","updated_at":"2025-03-28T12:44:22.889Z","avatar_url":"https://github.com/bu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# copicake-go\n🍰 Copicake, a data-driven image generating service to let you generate any social media material with just ONE CLICK.\n\n* 🔗 Website: https://copicake.com/\n* 📘 Official API Docs: https://docs.copicake.com/\n\n# Installations\nRun `go get github.com/bu/copicake-go` under your module directory\n\n# Usage\nDetailed checkout example codes under `example/`, here is a quick example:\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"time\"\n\n\t\"github.com/bu/copicake-go/v1\"\n)\n\nfunc main() {\n\t// create a new copicake client\n\tcake, err := copicake.New(\u0026copicake.ClientConfig{\n\t\tApiKey:        \"\u003cYOUR_API_KEY_HERE\u003e\",\n\t\tRetryTimeout:  1 * time.Second,\n\t\tRetryMaxTries: 5,\n\t})\n\n\tif err != nil {\n\t\tlog.Fatalf(\"cannot init Copicake client: %s\", err)\n\t}\n\n\t// create new render job\n\tjob, err := cake.NewRenderRequest(copicake.RenderRequest{\n\t\tTemplateID: \"\", // Get template ID\n\t\tChanges: []copicake.C{\n\t\t\t{\n\t\t\t\t\"name\": \"message\",\n\t\t\t\t\"text\": \"2\",\n\t\t\t},\n\t\t},\n\t})\n\n\tif err != nil {\n\t\tlog.Fatalf(\"cannot create Copicake render job: %s\", err)\n\t}\n\n\t// query current process status\n\tstatus, err := job.Status()\n\n\tif err != nil {\n\t\tlog.Fatalf(\"cannot get process status\")\n\t}\n\n\tlog.Printf(\"status: %+v\", status)\n\n\t// wait for image to be ready, return result url\n\turl, err := job.URL()\n\n\tif err != nil {\n\t\tlog.Fatalf(\"cannot get image URL: %s\", err)\n\t}\n\n\tlog.Printf(\"url: %+v\", url)\n\n\t// wait for image to be ready, return result image content\n\timage, err := job.Image()\n\n\tif err != nil {\n\t\tlog.Fatalf(\"cannot get image: %s\", err)\n\t}\n\n\tlog.Printf(\"image: %+v\", image)\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbu%2Fcopicake-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbu%2Fcopicake-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbu%2Fcopicake-go/lists"}