{"id":13718498,"url":"https://github.com/alexdovzhanyn/devrant","last_synced_at":"2025-03-26T19:33:56.127Z","repository":{"id":62557115,"uuid":"108947401","full_name":"alexdovzhanyn/devrant","owner":"alexdovzhanyn","description":"Ruby Wrapper for the devRant API","archived":false,"fork":false,"pushed_at":"2017-11-15T02:44:38.000Z","size":42,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T07:51:21.539Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexdovzhanyn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-31T04:59:53.000Z","updated_at":"2018-03-09T20:33:57.000Z","dependencies_parsed_at":"2022-11-03T06:15:33.908Z","dependency_job_id":null,"html_url":"https://github.com/alexdovzhanyn/devrant","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/alexdovzhanyn%2Fdevrant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdovzhanyn%2Fdevrant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdovzhanyn%2Fdevrant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdovzhanyn%2Fdevrant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexdovzhanyn","download_url":"https://codeload.github.com/alexdovzhanyn/devrant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245722812,"owners_count":20661830,"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-08-03T01:00:29.616Z","updated_at":"2025-03-26T19:33:55.738Z","avatar_url":"https://github.com/alexdovzhanyn.png","language":"Ruby","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"[![Gem Version](https://badge.fury.io/rb/devrant.svg)](https://badge.fury.io/rb/devrant)\n\n# Devrant\n\n![devRant](https://devrant.com/static/devrant/img/landing/features-avatars.png)\n\nThis gem is the unnofficial wrapper for the devRant API. It provides convinience methods and an interface to easily integrate devRant into\nyour ruby projects.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'devrant'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install devrant\n\n## Usage\n\nInclude this gem into your project:\n\n```ruby\nrequire 'devrant'\n```\n\nInitialize the devRant client:\n\n```ruby \ndevRant = Devrant::Api.new\n```\n\n### Rants\n\n**Getting all rants:**\n\n```ruby\nrequire 'devrant'\n\ndevRant = Devrant::Api.new\n\ndevRant.rants.all\n```\n\n**Getting rant by ID:**\n\n```ruby\nrequire 'devrant'\n\ndevRant = Devrant::Api.new\n\ndevRant.rants.get_rant(1234)\n```\n\n**Filtering Rants**\n\nAllows you to fetch rants based on certain filters. Takes in a hash of parameters.\n\n| Method  | Parameters      |\n|:--------|:----------------|\n|get_rants|limit, sort, skip|\n\n_Parameter Values_\n\n| Parameter      | Values    | Description                                         |\n|:---------------|:----------|:----------------------------------------------------|\n|limit _Optional_|any integer| Sets a maximum limit to the amount of rants returned|\n|sort _Optional_ |'recent', 'algo', 'top'| Specifies order in which to sort the rants|\n|skip _Optional_ |any integer| Specifies how many rants to skip. Useful for pagination|\n\n_Example:_\n\n```ruby\nrequire 'devrant'\n\ndevRant = Devrant::Api.new\n\ndevRant.rants.get_rants({limit: 10, sort: 'algo', skip: 5})\n```\n\n**Getting the Weekly Rants**\n\nFind all rants that are featured weekly\n\n```ruby\nrequire 'devrant'\n\ndevRant = Devrant::Api.new\n\ndevRant.rants.weekly\n```\n\n**Getting Story Rants**\n\nGet rants that are categorized as a 'story'\n\n```ruby\nrequire 'devrant'\n\ndevRant = Devrant::Api.new\n\ndevRant.rants.stories\n```\n\n**Getting Collabs**\n\nFetches all collabs\n\n```ruby\nrequire 'devrant'\n\ndevRant = Devrant::Api.new\n\ndevRant.rants.collabs\n```\n\n**Searching Rants**\n\nSearch rants by a specific search term\n\n```ruby\nrequire 'devrant'\n\ndevRant = Devrant::Api.new\n\ndevRant.rants.search('your search term here')\n```\n\n**Getting a Random Rant**\n\nReturns a random rant with at least 15++\n\n```ruby\nrequire 'devrant'\n\ndevRant = Devrant::Api.new\n\ndevRant.rants.random\n```\n\n**Commenting on a Rant**\n\nPost a comment. You must authenticate before trying to post a comment.\n\n\n| Method  | Parameters                                                                               |\n|:--------|:-----------------------------------------------------------------------------------------|\n|comment  |rant_id (int), comment_content (string), token_id (int), token_key (string), user_id (int)|\n\n```ruby\nrequire 'devrant'\n\ndevRant = Devrant::Api.new\n\nauth = devRant.users.authenticate('username', 'password')\n\ndevRant.rants.comment(12345, 'This is my comment', auth.id, auth.key, auth.user_id)\n```\n\n### Users\n\n**Getting User by ID:**\n\n```ruby\nrequire 'devrant'\n\ndevRant = Devrant::Api.new\n\ndevRant.users.get_user(1234)\n```\n\n**Getting User ID from Username**\n\n```ruby\nrequire 'devrant'\n\ndevRant = Devrant::Api.new\n\ndevRant.users.get_user_id('RuntimeError')\n```\n\n**Authenticating a User**\n\nReturns an auth object with a token id, token key, and user id.\n\n```ruby\nrequire 'devrant'\n\ndevRant = Devrant::Api.new\n\ndevRant.users.authenticate('username', 'password')\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/alexdovzanyn/devrant. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Devrant project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/alexdovzhanyn/devrant/blob/master/CODE_OF_CONDUCT.md).\n\n# Endpoints to Implement\n\n- ~~/devrant/rants~~\n- ~~/devrant/rants/:id~~\n- ~~/users/get-user-id~~\n- ~~/users/:id~~\n- ~~/comments~~\n- /vote\n- ~~/devrant/search~~\n- ~~/devrant/weekly-rants~~\n- ~~/devrant/story-rants~~\n- ~~/devrant/collabs~~\n- ~~/devrant/rants/surprise~~\n- ~~/users/auth-token~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdovzhanyn%2Fdevrant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexdovzhanyn%2Fdevrant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdovzhanyn%2Fdevrant/lists"}