{"id":15563061,"url":"https://github.com/dkam/reddit","last_synced_at":"2025-03-29T05:13:00.069Z","repository":{"id":136205012,"uuid":"306193710","full_name":"dkam/reddit","owner":"dkam","description":"Tiny library to get reddit posts \u0026 comments","archived":false,"fork":false,"pushed_at":"2022-08-30T07:30:09.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-03T14:48:31.091Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dkam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-22T01:48:03.000Z","updated_at":"2022-06-27T01:28:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"b3c70246-f7b7-40c3-ab4f-77a3ff23bdd1","html_url":"https://github.com/dkam/reddit","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"84decabb89983c68e9640f46b21b84eca8f2d61c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkam%2Freddit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkam%2Freddit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkam%2Freddit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkam%2Freddit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dkam","download_url":"https://codeload.github.com/dkam/reddit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246140591,"owners_count":20729802,"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-02T16:17:16.766Z","updated_at":"2025-03-29T05:13:00.050Z","avatar_url":"https://github.com/dkam.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reddit\n\n## Usage\nTiny library to get Reddit posts \u0026amp; comments\n\n```ruby\n\n$ ./bin/console\nirb(main):024:0\u003e lego = Reddit::Subreddit.new('lego')\n\nirb(main):025:0\u003e puts lego.title\nLEGO - News from a Studded World\n\nirb(main):026:0\u003e puts lego.public_description\n=\u003e \"Reports, news, pics, videos, discussions and documentation from a studded world.\\n\\n/r/lego is about all things LEGO®.\"\n\nirb(main):027:0\u003e puts lego.over18\nfalse\n\nirb(main):028:0\u003e puts lego[0] # Also - puts lego[0].title\nLEGO CON 2022 - Livestream Megathread\n\n\nirb(main):029:0\u003e puts lego[0].selftext\nWelcome to the r/lego discussion MegaThread for LEGO CON 2022!\n                                                              \n**Where:** www.Lego.com/lego-con                              \n**Date:** June 18, 2022 (Today!)                              \n                                                              \n**Time:** It's over!  You can watch the replay here: https://youtu.be/ZHSnx-smuUA\n                                                              \n**What Is LEGO CON?** For a summary of what was announced last year, visit our [LEGO CON 2021 Megathread](https://redd.it/o8dct1).\n                                                              \nThis is the thread for discussion of the Lego CON 2022 Live Stream. I'll be recapping the stream below, for those who can't watch the live video.\n\nirb(main):030:0\u003e puts lego[0].url # URL may point to an external URL\nhttps://www.reddit.com/r/lego/comments/vf8ti4/lego_con_2022_livestream_megathread/\n\nirb(main):031:0\u003e puts lego[1][0] # First comment\nAnd I thought I had a problem.\nirb(main):032:0\u003e puts lego[1][0][0] # First comment on the first comment\nThere is no such thing as too many LEGO. You don’t have a problem\n```\n\nCheck what data is available in the post:\n\n```ruby\nlego[0].to_h.keys.join(', ')\n=\u003e \"approved_at_utc, subreddit, selftext, author_fullname, saved, mod_reason_title, gilded, clicked, title, link_flair_richtext, subreddit_name_prefixed, hidden, pwls, link_flair_css_class, downs, thumbnail_height, top_awarded_type, hide_score, name, quarantine, link_flair_text_color, upvote_ratio, author_flair_background_color, subreddit_type, ups, total_awards_received, media_embed, thumbnail_width, author_flair_template_id, is_original_content, user_reports, secure_media, is_reddit_media_domain, is_meta, category, secure_media_embed, link_flair_text, can_mod_post, score, approved_by, is_created_from_ads_ui, author_premium, thumbnail, edited, author_flair_css_class, author_flair_richtext, gildings, content_categories, is_self, mod_note, created, link_flair_type, wls, removed_by_category, banned_by, author_flair_type, domain, allow_live_comments, selftext_html, likes, suggested_sort, banned_at_utc, view_count, archived, no_follow, is_crosspostable, pinned, over_18, all_awardings, awarders, media_only, link_flair_template_id, can_gild, spoiler, locked, author_flair_text, treatment_tags, visited, removed_by, num_reports, distinguished, subreddit_id, author_is_blocked, mod_reason_by, removal_reason, link_flair_background_color, id, is_robot_indexable, report_reasons, author, discussion_type, num_comments, send_replies, whitelist_status, contest_mode, mod_reports, author_patreon_flair, author_flair_text_color, permalink, parent_whitelist_status, stickied, url, subreddit_subscribers, created_utc, num_crossposts, media, is_video\"\n```\n\n## Convert Reddit JSON to JSON Feed\n\nRun `ruby jsonfeed.rb`\n\nThen browse to `http://localhost:4567/r/nononoyes`.  Even better, subscribe to it in your feed reader.\n\n## Alternatives\n\nIf you're looking for a fully featured client, try [Redd](https://github.com/avinashbot/redd)\n\n\n# Licence\nThis is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to \u003chttp://unlicense.org/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkam%2Freddit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdkam%2Freddit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkam%2Freddit/lists"}