{"id":18569188,"url":"https://github.com/coding-cactus/repltalk","last_synced_at":"2025-04-10T06:31:58.095Z","repository":{"id":52948850,"uuid":"343839371","full_name":"Coding-Cactus/repltalk","owner":"Coding-Cactus","description":"The most complete wrapper for the repl talk gql api","archived":false,"fork":false,"pushed_at":"2022-08-05T10:54:24.000Z","size":67,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T17:01:41.314Z","etag":null,"topics":["api-wrapper","replit","repltalk","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/Coding-Cactus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-02T16:28:52.000Z","updated_at":"2022-01-19T18:48:49.000Z","dependencies_parsed_at":"2022-08-21T01:20:09.951Z","dependency_job_id":null,"html_url":"https://github.com/Coding-Cactus/repltalk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coding-Cactus%2Frepltalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coding-Cactus%2Frepltalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coding-Cactus%2Frepltalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coding-Cactus%2Frepltalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Coding-Cactus","download_url":"https://codeload.github.com/Coding-Cactus/repltalk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248168276,"owners_count":21058804,"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-wrapper","replit","repltalk","ruby"],"created_at":"2024-11-06T22:32:53.116Z","updated_at":"2025-04-10T06:31:57.724Z","avatar_url":"https://github.com/Coding-Cactus.png","language":"Ruby","readme":"\u003cp align=\"center\"\u003e\u003cimg alt=\"repltak\" src=\"https://repltalk-logo.codingcactus.repl.co/logo.png\" /\u003e\u003c/p\u003e\n\n\nA ruby wrapper for the [repl talk](https://repl.it/talk) gql api.\n\n# Getting Started\n\n## Gemfile\n```\ngem \"repltalk\"\n```\n\n## Initializing Client\n\n```ruby\nrequire \"repltalk\"\n\nclient = ReplTalk::Client.new\n```\n\nOnce you have your client initialized, you can start getting users, posts, comments etc.\n\n***\n\n# Code Snippets\nA few small snippets of examples of what you can do with the repltalk gem\n\n### Get CodingCactus' posts from the top 100 posts:\n```ruby\nclient.get_posts(order: \"Top\", count: 100).select { |post| post.author.username == \"CodingCactus\" }\n```\n\n### Get the 10 most recent ruby post's URLs\n```ruby\nclient.get_posts(count: 10, languages: ['ruby']).map { |post| post.url }\n```\n\n### See how many people have forked CodingCactus' classrooms repl\n```ruby\nclient.get_repl(\"/@CodingCactus/classrooms\").fork_count\n```\n\n### See how many comments in a post mention CodingCactus\n```ruby\nmentions = 0\nclient.get_post(33995).get_comments(count: 999999999).each do |comment|\n\tmentions += 1 if comment.content.include?(\"@CodingCactus\")\n\tcomment.get_comments.each { |child_comment| mentions += 1 if child_comment.content.include?(\"@CodingCactus\") }\n\tsleep 0.25 # need to be careful with rate limits\nend\n```\n\n### See how many repls of each language CodingCactus has\n```ruby\nlang_count = client.get_user(\"CodingCactus\").get_repls(count: 999999).reduce(Hash.new(0)) do |langs, repl|\n  langs[repl.language.id] += 1\n  langs\nend\n```\n\n***\n# All Methods Documentation\n\n## Client\n+ `#get_user username` Get a user from their username. Returns `User`\n+ `#get_user_by_id id` Get a user from their id. Returns `User`\n+ `#search_user query, :count` Search for users whose username start with the query. Returns array of `User`s. **Need to be logged in, unfortunately**\n+ `#get_post id` Get a post from it's id. Returns `Post`\n+ `#get_comment id` Get a comment from it's id. Returns `Comment`\n+ `#get_repl url` Get a repl from it's url. Returns `Repl`\n+ `#get_repl_comment id` Get a repl comment from its id. Returns `ReplComment`\n+ `#get_board name` Get a board from it's name. Returns `Board`\n+ `#get_posts :board, :order, :count, :after, :search` Get posts from repltalk. Returns array of `Post`s\n+ `#create_post board_name, title, content, :repl_id, :show_hosted` Create a repl talk post. Returns `Post`\n+ `#get_explore_featured_repls` Get the featured repls on explore. Returns array of `Repl`s\n+ `#get_trending_tags :count` Get the tags which are trending on explore. Returns array of `Tag`s\n+ `#get_tag id` Get a tag. Returns `Tag`\n\n## User\n+ `#id` User's id\n+ `#username` User's username\n+ `#name` User's full name\n+ `#pfp` URL of the user's pfp\n+ `#bio` User's bio\n+ `#timestamp` When the account was made\n+ `#is_hacker` Whether the user has the hacker plan\n+ `#roles` User's roles. Returns an array of `Role`s\n+ `#languages` Languages that the user has used. Returns array of `Language`s\n+ `#get_posts :order, :count, :after` Get the user's posts. Returns array of `Post`s\n+ `#get_comments :order, :count, :after` Get the user's comments. Returns array of `Comment`s\n+ `get_repls :count, :order, :direction, :before, :after, :pinnedReplsFirst, :showUnnamed` Get the user's repls. Returns array of `Repl`s\n\n## Post\n+ `#id` Post's id\n+ `#url` Post's url\n+ `#repl` Repl attached to the post. Returns nil if there is none. Else returns `Repl`\n+ `#board` Board that the post is from. Returns `Board`\n+ `#title` Post's title\n+ `#author` Post's author. Returns `User`\n+ `#content` Post's content\n+ `#preview` Preview of the post's content.\n+ `#timestamp` When the post was posted\n+ `#vote_count` How many votes there post has\n+ `#comment_count` How many comments the post has\n+ `#answer` The comment that has been marked as the answer. Returns `nil` if there is none, else `Comment`\n+ `#is_answered` Whether an answer has been selected\n+ `#is_answerable` Whether you are able to answer the post\n+ `#is_announcement` Whether the post in marked as an announcement\n+ `#is_pinned` Whether the post is pinned\n+ `#is_locked` Whether the post is locked\n+ `#is_hidden` Whether the post is hidden (unlisted)\n+ `#get_upvotes :count` Get the users that have upvoted the post. Count defaults to 10. Returns array or `User`s\n+ `#get_comments :order, :count, :after` Get the post's comments. Returns array of `Comment`s\n+ `#create_comment  content` Comment on the post. Returns `Comment`\n+ `#edit :title, :content, :repl_id, :show_hosted` Edit the post. Returns `Post`\n+ `#delete` Delete the post\n+ `#report reason` Report the post\n\n## Comment\n+ `#id` Comment's id\n+ `#url` Comment's url\n+ `#author` Comment's author. Returns `User`\n+ `#content` Comment's content\n+ `#post_id` Id of the post that the comment is on\n+ `#is_answer` Whether the comment has been selected as the answer to a post\n+ `#vote_count` How many votes the comment has\n+ `#timestamp` When the comment was made\n+ `#get_post` Get the post that the comment was made on. Returns `Post`\n+ `#get_comments` Get the children comments of the comment. Returns array of `Comment`s\n+ `#get_parent` Get the parent comment of a child comment. Returns `nil` if it isn't a child, else `Comment`\n+ `#create_comment content` reply to the comment. Returns `Comment`\n+ `#edit content` Edit the comment. Returns `Comment`\n+ `#delete` Delete the comment\n+ `#report reason` Report the comment\n\n## Repl\n+ `#id` Repl's id\n+ `#url` Repl's URL\n+ `#title` Repl's name\n+ `#author` Repl's author. Returns `User`\n+ `#description` Repl's description\n+ `#timestamp` When the repl was made\n+ `#size` How many bytes the repl is\n+ `#run_count` How many times the repl has been run\n+ `#fork_count` How many times the repl has been forked\n+ `#language` Repl's language. Returns `Language`\n+ `#image_url` Repl image's url\n+ `#origin_url` Url of the repl from which this repl was forked\n+ `#is_private` Whether the repl is private\n+ `#is_always_on` Whether the repl is always on\n+ `#tags` Tags tagged on the repl. Returns array of `Tag`s\n+ `#reactions` Reactions reacted on the repl. Returns array of `Reaction`s\n+ `#get_forks` Repl's forks. Returns array of `Repl`s\n+ `#get_comments` Repl's comments. Returns array of `ReplComment`s\n+ `#create_comment content` Comment on the repl\n+ `#add_reaction type` Add a reaction to the repl\n+ `#remove_reaction type` Remove a reaction from the repl\n+ `#publish description, image_url, tags, :enable_comments` Publish the repl. Use this to publish an update too\n+ `#unpublish` Unpublish the repl\n\n\n## ReplComment\n+ `#id` Comment's id\n+ `#content` Comment's content\n+ `#author` Comment's author. Returns `User`\n+ `#repl` Repl the comment was made on. Returns `Repl`\n+ `#replies` Comment's replies. Returns array of `ReplComment`s\n+ `#create_comment content` Reply to the repl comment\n+ `#edit content` Edit the repl comment\n+ `#delete` Delete the repl comment\n\n## Tag\n+ `#id` Tag's id (name)\n+ `#repl_count` How many repls are listed under the tag\n+ `#creator_count` How many different users are listed under the tag\n+ `#is_trending` Whether the tag is trending\n+ `#repls_tagged_today_count` How many repls have been published with the tag today\n+ `#get_repls :count, :after` Get the top 10 repls that have the tag. Returns array of `Repl`s\n\n## Reaction\n+ `#id` Reaction's id\n+ `#type` Reaction's type (heart, eyes etc.)\n+ `#count` How many people have reacted with this reaction on the repl\n\n\n## Language\n+ `#id` Language's id (like 'python3' or 'html')\n+ `#key` Language's key\n+ `#name` Language's name (like 'Python' or 'HTML, CSS, JS')\n+ `#tagline` Language's tagline\n+ `#category` Category that the language is in\n+ `#icon` URL of the language's icon\n\n## Role\n+ `#name` Role's name\n+ `#key` Role's key\n+ `#tagline` Role's tagline\n\n## Board\n+ `#id` Board's id\n+ `#name` Board's name\n+ `#color` Board's color\n+ `#description` Board's description\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoding-cactus%2Frepltalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoding-cactus%2Frepltalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoding-cactus%2Frepltalk/lists"}