{"id":43064663,"url":"https://github.com/atye/redmed","last_synced_at":"2026-01-31T12:35:59.400Z","repository":{"id":59045714,"uuid":"530467239","full_name":"atye/redmed","owner":"atye","description":"Go client for posting media to Reddit","archived":false,"fork":false,"pushed_at":"2022-09-01T02:45:29.000Z","size":1569,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T08:17:42.967Z","etag":null,"topics":["go","golang","media","reddit","reddit-api","reddit-client"],"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/atye.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":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2022-08-30T02:22:24.000Z","updated_at":"2023-07-30T18:51:44.000Z","dependencies_parsed_at":"2022-09-11T04:52:28.447Z","dependency_job_id":null,"html_url":"https://github.com/atye/redmed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/atye/redmed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atye%2Fredmed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atye%2Fredmed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atye%2Fredmed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atye%2Fredmed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atye","download_url":"https://codeload.github.com/atye/redmed/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atye%2Fredmed/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28943437,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T12:10:04.904Z","status":"ssl_error","status_checked_at":"2026-01-31T12:09:58.894Z","response_time":128,"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":["go","golang","media","reddit","reddit-api","reddit-client"],"created_at":"2026-01-31T12:35:55.671Z","updated_at":"2026-01-31T12:35:59.395Z","avatar_url":"https://github.com/atye.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redmed\n\n`redmed` is a **red**it API wrapper for posting **med**ia (image, video, videogif) submissions.\n\n## Why?\nExisting Reddit API clients, such as [go-reddit](https://github.com/vartanbeno/go-reddit), only support link and self posts. \n\n`redmed` used alongside existing tools gives you a more complete Reddit API wrapper.\n\n## Usage (see [examples)](https://github.com/atye/redmed/blob/main/examples/main.go)\n\n### Create a client\n```\nreddit := redmed.New(userAgent, clientID, secret, username, password)\n```\n\nWith HTTP Client\n\n```\nc := \u0026http.Client{Timeout: time.Second * 30}\nreddit := redmed.New(userAgent, clientID, secret, username, password, redmed.WithHTTPClient(c))\n```\n\nWith [gorilla](https://github.com/gorilla/websocket) Websocket Dialer\n\n```\nd := websocket.DefaultDialer\nd.TLSClientConfig = \u0026tls.Config{InsecureSkipVerify: true}\nreddit := redmed.New(userAgent, clientID, secret, username, password, redmed.WithWebsocketDialer(d))\n```\n### Post an image\n\nSupported image types:\n\n - .png \n - .jpg \n - .jpeg \n - .gif\n\n\u003cdetails\u003e\n    \u003csummary\u003ePost image from local machine\u003c/summary\u003e\n\n```go\nreq := redmed.PostImageRequest{\n    NSWF: false,\n    Path: \"/path/to/image.jpeg\",\n    Resubmit: true,\n    SendReplies: true,\n    Spoiler: false,\n    Subreddit: \"subreddit\",\n    Title: \"image from local path\",\n}\n\nname, err := reddit.PostImage(context.Background(), req)\nif err != nil {\n    fmt.Println(err)\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003ePost image from link\u003c/summary\u003e\n\n```go\nreq := redmed.PostImageRequest{\n    NSWF: false,\n    Path: \"https://host.com/image.jpeg\",\n    Resubmit: true,\n    SendReplies: true,\n    Spoiler: false,\n    Subreddit: \"subreddit\",\n    Title: \"image from local path\",\n}\n\nname, err := reddit.PostImage(context.Background(), req)\nif err != nil {\n    fmt.Println(err)\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003ePost image gallery\u003c/summary\u003e\n\n```go\nreq := redmed.PostGalleryRequest{\n    NSWF: false,\n\tPaths: []string{\"/path/to/image.jpeg\", \"https://host.com/image.jpeg\"},\n\tSendReplies: true,\n\tSpoiler: false,\n\tSubreddit: \"subreddit\",\n\tTitle: \"gallery from local path and link\",\n}\n\nname, err := reddit.PostGallery(context.Background(), req)\nif err != nil {\n    fmt.Println(err)\n}\n```\n\u003c/details\u003e\n\n### Post a video\n\nSupported image types:\n\n - .mp4\n - .mov\n \n\u003cdetails\u003e\n    \u003csummary\u003ePost video from local machine with thumbnail image from link\u003c/summary\u003e\n\n```go\nreq := redmed.PostVideoRequest{\n\tKind: \"video\", // or videogif for silent video\n\tNSWF: false,\n\tVideoPath: \"/path/to/video.mp4\",\n\tResubmit: true,\n\tSendReplies: true,\n\tSpoiler: false,\n\tSubreddit: \"subreddit\",\n\tTitle: \"video from local path\",\n\tThumbnailPath: \"https://host.com/image.jpeg\",\n}\n\nname, err := reddit.PostVideo(context.Background(), req)\nif err != nil {\n    fmt.Println(err)\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003ePost video from link with thumbnail image from local path\u003c/summary\u003e\n\n```go\nreq := redmed.PostVideoRequest{\n\tKind: \"video\", // or videogif for silent video\n\tNSWF: false,\n\tVideoPath: \"https://host.com/video.mp4\",\n\tResubmit: true,\n\tSendReplies: true,\n\tSpoiler: false,\n\tSubreddit: \"subreddit\",\n\tTitle: \"video from link\",\n\tThumbnailPath: \"/path/to/image.jpeg\",\n}\n\nname, err := reddit.PostVideo(context.Background(), req)\nif err != nil {\n    fmt.Println(err)\n}\n```\n\u003c/details\u003e\n\nThe `name` returned from submitting posts is the *fullname* of the post, such as `t3_x2dx7f`. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatye%2Fredmed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatye%2Fredmed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatye%2Fredmed/lists"}