{"id":20657106,"url":"https://github.com/kallydev/telegraph-go","last_synced_at":"2025-04-19T12:28:05.981Z","repository":{"id":53526228,"uuid":"301754844","full_name":"kallydev/telegraph-go","owner":"kallydev","description":"Golang Telegraph API SDK.","archived":false,"fork":false,"pushed_at":"2023-03-18T13:37:21.000Z","size":39,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-06-19T02:07:21.795Z","etag":null,"topics":["go","golang","telegraph","telegraph-api"],"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/kallydev.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":"2020-10-06T14:29:24.000Z","updated_at":"2023-06-29T11:04:54.000Z","dependencies_parsed_at":"2024-06-19T01:50:02.034Z","dependency_job_id":"9d920af0-8deb-40fe-a977-550b296c237c","html_url":"https://github.com/kallydev/telegraph-go","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kallydev%2Ftelegraph-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kallydev%2Ftelegraph-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kallydev%2Ftelegraph-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kallydev%2Ftelegraph-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kallydev","download_url":"https://codeload.github.com/kallydev/telegraph-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224952328,"owners_count":17397537,"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":["go","golang","telegraph","telegraph-api"],"created_at":"2024-11-16T18:18:34.424Z","updated_at":"2024-11-16T18:18:34.935Z","avatar_url":"https://github.com/kallydev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegraph Go\n\nGolang [Telegraph API](https://telegra.ph/api) SDK.\n\n## Guide\n\n### Installation\n\n```bash\ngo get github.com/kallydev/telegraph-go\n```\n\n### Example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/kallydev/telegraph-go\"\n\t\"log\"\n)\n\nfunc main() {\n\tclient, err := telegraph.NewClient(\"\", nil)\n\tif err != nil {\n\t\tlog.Panicln(err)\n\t}\n\taccount, err := client.CreateAccount(\"telegraph-go\", \u0026telegraph.CreateAccountOption{\n\t\tAuthorName: \"TelegraphGo\",\n\t\tAuthorURL:  \"https://github.com/kallydev\",\n\t})\n\tif err != nil {\n\t\tlog.Panicln(err)\n\t}\n\tclient.AccessToken = account.AccessToken\n\tpaths, err := client.Upload([]string{\n\t\t\"public/banner.png\",\n\t})\n\tif err != nil {\n\t\tlog.Panicln(err)\n\t}\n\tpage, err := client.CreatePage(\"Telegraph-Go Example\", []telegraph.Node{\n\t\ttelegraph.NodeElement{\n\t\t\tTag: \"p\",\n\t\t\tChildren: []telegraph.Node{\n\t\t\t\t\"hello world\",\n\t\t\t\ttelegraph.NodeElement{\n\t\t\t\t\tTag: \"img\",\n\t\t\t\t\tAttrs: map[string]string{\n\t\t\t\t\t\t\"src\":  paths[0],\n\t\t\t\t\t\t\"alt\": \"Banner\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}, \u0026telegraph.CreatePageOption{\n\t\tReturnContent: true,\n\t})\n\tif err != nil {\n\t\tlog.Panicln(err)\n\t}\n\tfmt.Println(page)\n}\n```\n\n## License\n\nCopyright (c) KallyDev. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkallydev%2Ftelegraph-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkallydev%2Ftelegraph-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkallydev%2Ftelegraph-go/lists"}