{"id":13718387,"url":"https://github.com/danillouz/devrant","last_synced_at":"2025-12-28T13:57:05.561Z","repository":{"id":52164004,"uuid":"60042897","full_name":"danillouz/devrant","owner":"danillouz","description":"Unofficial wrapper for the public devRant API.","archived":false,"fork":false,"pushed_at":"2021-05-06T17:50:05.000Z","size":185,"stargazers_count":46,"open_issues_count":3,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-03-15T04:22:49.154Z","etag":null,"topics":["api","api-client","devrant"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danillouz.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}},"created_at":"2016-05-30T22:41:26.000Z","updated_at":"2023-10-29T09:29:18.000Z","dependencies_parsed_at":"2022-09-02T04:03:45.095Z","dependency_job_id":null,"html_url":"https://github.com/danillouz/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/danillouz%2Fdevrant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danillouz%2Fdevrant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danillouz%2Fdevrant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danillouz%2Fdevrant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danillouz","download_url":"https://codeload.github.com/danillouz/devrant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224585523,"owners_count":17335870,"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","api-client","devrant"],"created_at":"2024-08-03T01:00:25.724Z","updated_at":"2025-12-28T13:57:05.500Z","avatar_url":"https://github.com/danillouz.png","language":"JavaScript","readme":"# devRant\n[![NPM Version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n\n[npm-image]: https://img.shields.io/badge/npm-v0.0.7-blue.svg\n[npm-url]: https://www.npmjs.com/package/devrant\n[travis-image]: https://travis-ci.org/danillouz/devrant.svg?branch=master\n[travis-url]: https://travis-ci.org/danillouz/devrant\n\nUnofficial wrapper for the **public** [devRant](https://www.devrant.com/) API.\n\n![devRant](https://raw.githubusercontent.com/danillouz/devrant/master/img/devrant.png \"devRant\")\n\n## Requirements\nYou need node version **6** or greater.\n\n## Installation\n`npm i -S devrant`\n\n## Interface\nThis module exposes methods to fetch rants (posts) from\ndevRant and to fetch the profile of a devRant user by\nusername.\n\n## devRant Display Requirements\nWhen displaying the contents of a rant fetched from the\n[devRant](https://www.devrant.com/) API, it is **required**\nto credit the author of a rant by displaying their devRant\nusername.\n\n## Syntax\n```javascript\ndevRant\n  .rants()\n  .then()\n  .catch();\n```\n\n## Methods\nAfter requiring the module, the following methods can be\nused:\n\n| METHOD | ARGUMENTS | RETURNS | DESCRIPTION |\n| --- | --- | --- | --- |\n| [rant](#rantid) | Yes | `Promise` | Retrieve a single rant from devRant. Use this method to retrieve a rant with its full text and comments. The retrieved rant is a [Full Rant Object](#rant-object-full). |\n| [rants](#rantsoptions) | Optional | `Promise` | Retrieve rants from devRant. The retrieved rants are [Simple Rant Objects](#rant-object-simple). |\n| [search](#searchterm) | Yes | `Promise` | Retrieve rants from devRant that match a specific search term. The retrieved rants are [Simple Rant Objects](#rant-object-simple). |\n| [profile](#profileusername) | Yes | `Promise` | Retrieve the profile of a devRant user by username. The retrieved profile is a [Profile Object](#profile-object). |\n\n### .rant(id)\nRetrieve a single rant from devRant. Use this method to retrieve a rant\nwith its full text and comments.\n\nThe retrieved rant is a [Full Rant Object](#rant-object-full).\n\n###### Arguments\n| NAME | TYPE | DESCRIPTION |\n| --- | --- | --- |\n| id | Number | The rant id. For example `43511`. |\n\n###### Returns\n`Promise`.\n\n### .rants(options)\nRetrieve rants from devRant.\n\nBy providing an options Object as an argument, it's possible\nto sort by `algo`, `recent` and `top` rants. As well as\nlimiting and skipping the amount of rants to be fetched.\n\nThe retrieved rants are [Simple Rant Objects](#rant-object-simple).\n\n###### Arguments\n| NAME | TYPE | DESCRIPTION |\n| --- | --- | --- |\n| options | Object | **Optional**. The [options](#options) to control the rants to be fetched. When omitted, `50` rants of type `algo` will be fetched and `0` rants will be skipped. |\n\n###### Options\n| OPTIONS KEY | TYPE | DESCRIPTION |\n| --- | --- | --- |\n| sort | String | **Optional**. The type of rants to be fetched. Must be `algo`, `recent` or `top`. When omitted, it defaults to `algo`. |\n| limit | Number | **Optional**. The amount of rants to be fetched. When omitted, it defaults to `50`. |\n| skip | Number | **Optional**. The amount of rants to be skipped. When omitted, it defaults to `0`. |\n\n###### Returns\n`Promise`.\n\n### .search(term)\nRetrieve rants from devRant that match a specific search\nterm.\n\nThe retrieved rants are [Simple Rant Objects](#rant-object-simple).\n\n###### Arguments\n| NAME | TYPE | DESCRIPTION |\n| --- | --- | --- |\n| term | String | The search term used to match specific rants. For example `javascript`, `xcode`, `wk2`, `devrant`, etc. |\n\n###### Returns\n`Promise`.\n\n### .profile(username)\nRetrieve the profile of a devRant user by username.\n\nThe retrieved profile is a [Profile Object](#profile-object).\n\n###### Arguments\n| NAME | TYPE | DESCRIPTION |\n| --- | --- | --- |\n| username | String | The devRant username. For example `danillouz`, `dfox`, `localhost`, etc. |\n\n###### Returns\n`Promise`.\n\n## Rant Object Simple\n```json\n{\n  \"id\": 43511,\n  \"text\": \"when people think you know everything...\",\n  \"num_upvotes\": 38,\n  \"num_downvotes\": 1,\n  \"score\": 37,\n  \"created_time\": 1464610498,\n  \"attached_image\": {\n    \"url\": \"https://d1fvlyhrbsf219.cloudfront.net/devrant/rant/r_43511_uQDW4.jpg\",\n    \"width\": 600,\n    \"height\": 300\n  },\n  \"num_comments\": 5,\n  \"tags\": [ ],\n  \"vote_state\": 0,\n  \"user_id\": 15601,\n  \"user_username\": \"Mung00se\",\n  \"user_score\": 272\n}\n```\n\n## Rant Object Full\n```json\n{\n  \"rant\": {\n    \"id\": 43511,\n    \"text\": \"when people think you know everything...\",\n    \"num_upvotes\": 39,\n    \"num_downvotes\": 1,\n    \"score\": 38,\n    \"created_time\": 1464610498,\n    \"attached_image\": {\n      \"url\": \"https://d1fvlyhrbsf219.cloudfront.net/devrant/rant/r_43511_uQDW4.jpg\",\n      \"width\": 600,\n      \"height\": 300\n    },\n    \"num_comments\": 5,\n    \"tags\": [ ],\n    \"vote_state\": 0,\n    \"user_id\": 15601,\n    \"user_username\": \"Mung00se\",\n    \"user_score\": 273\n  },\n  \"comments\": [\n    {\n      \"id\": 43529,\n      \"rant_id\": 43511,\n      \"body\": \"But at some point we all do it.\",\n      \"num_upvotes\": 2,\n      \"num_downvotes\": 0,\n      \"score\": 2,\n      \"created_time\": 1464611516,\n      \"vote_state\": 0,\n      \"user_id\": 505,\n      \"user_username\": \"Jumpshot44\",\n      \"user_score\": 2233\n    }\n  ],\n  \"success\": true\n}\n```\n\n## Profile Object\n```json\n{\n  \"username\": \"danillouz\",\n  \"score\": 207,\n  \"about\": \"I spend too much time tweaking my terminal and color schemes..\",\n  \"location\": \"The Netherlands\",\n  \"created_time\": 1463432703,\n  \"skills\": \"Node.js, JavaScript, mongoDB, GraphQL, ObjectiveC, Go\",\n  \"github\": \"danillouz\",\n  \"content\": {\n    \"content\": {\n      \"rants\": [\n        {\n          \"id\": 38898,\n          \"text\": \"Me and my team are working on a system where we depend on a component that was built by a different dev team and hasn't been integration tested yet, because it's that new. This is how it's going..\",\n          \"num_upvotes\": 35,\n          \"num_downvotes\": 0,\n          \"score\": 35,\n          \"created_time\": 1464211080,\n          \"attached_image\": {\n            \"url\": \"https://d1fvlyhrbsf219.cloudfront.net/devrant/rant/r_38898_Z93E9.gif\",\n            \"width\": 380,\n            \"height\": 230\n          },\n          \"num_comments\": 2,\n          \"tags\": [\n            \"teams\",\n            \"integration-testing\",\n            \"dependencies\"\n          ],\n          \"vote_state\": 0,\n          \"user_id\": 27942,\n          \"user_username\": \"danillouz\",\n          \"user_score\": 207\n        }\n      ],\n      \"upvoted\": [\n        {\n          \"id\": 42586,\n          \"text\": \"My office desk\",\n          \"num_upvotes\": 65,\n          \"num_downvotes\": 0,\n          \"score\": 65,\n          \"created_time\": 1464530939,\n          \"attached_image\": {\n            \"url\": \"https://d1fvlyhrbsf219.cloudfront.net/devrant/rant/r_42586_9jWtu.jpg\",\n            \"width\": 800,\n            \"height\": 600\n          },\n          \"num_comments\": 18,\n          \"tags\": [\n            \"mydesk\"\n          ],\n          \"vote_state\": 0,\n          \"user_id\": 13541,\n          \"user_username\": \"dvlpr\",\n          \"user_score\": 104\n        }\n      ],\n      \"comments\": [\n        {\n          \"id\": 41422,\n          \"rant_id\": 41065,\n          \"body\": \"@xroad Hodor\",\n          \"num_upvotes\": 3,\n          \"num_downvotes\": 0,\n          \"score\": 3,\n          \"created_time\": 1464425475,\n          \"vote_state\": 0,\n          \"user_id\": 27942,\n          \"user_username\": \"danillouz\",\n          \"user_score\": 207\n        }\n      ]\n    },\n    \"counts\": {\n      \"rants\": 5,\n      \"upvoted\": 37,\n      \"comments\": 16\n    }\n  }\n}\n```\n\n## Examples\n- [Rant](#fetch-rant-with-id-43511)\n- [Rants with Options](#fetch-10-rants-of-type-top-and-skip-the-first-10)\n- [Rants Default](#fetch-50-rants-of-type-algo-and-skip-0-by-using-default-behavior)\n- [Search](#fetch-all-rants-that-match-the-search-term-javascript)\n- [Profile](#fetch-the-profile-of-the-devrant-user-with-username-dfox)\n\n#### Fetch rant with id `43511`\n```javascript\n'use strict';\n\nconst devRant = require('devrant');\n\ndevRant\n  .rant(43511)\n  .then(function receiveRant(rant) {\n    console.log('rant: ', rant);\n  })\n  .catch(function errorHandler(err) {\n    console.log('err: ', err.message);\n  });\n```\n\n#### Fetch `10` rants of type `top` and skip the first `10`\n```javascript\nconst devRant = require('devrant');\n\ndevRant\n  .rants({\n\tsort: 'top',\n\tlimit: 10,\n\tskip: 10\n  })\n  .then(function receiveRants(rants) {\n    console.log('rants: ', rants);\n  })\n  .catch(function errorHandler(err) {\n    console.log('err: ', err.message);\n  });\n```\n\n#### Fetch `50` rants of type `algo` and skip `0` by using default behavior\n```javascript\n'use strict';\n\nconst devRant = require('devrant');\nconst co = require('co');\n\nfunction algoRants() {\n  return co(function *fetchRants() {\t  \n    const rants = yield devRant.rants();\n\n    console.log(`rants: ${rants}`);\n  });\n}\n\nalgoRants();\n```\n\n#### Fetch all rants that match the search term `javascript`\n```javascript\n'use strict';\n\nconst devRant = require('devrant');\nconst co = require('co');\n\nfunction search(term) {\n  return co(function *searchRants() {\t  \n    const rants = yield devRant.search(term);\n\n    console.log(`rants: ${rants}`);\n  });\n}\n\nsearch('javascript');\n```\n\n#### Fetch the profile of the devRant user with username `dfox`\n```javascript\n'use strict';\n\nconst devRant = require('devrant');\nconst co = require('co');\n\nfunction getProfile(username) {\n  return co(function *fetchProfile() {\t  \n    const profile = yield devRant.profile(username);\n\n    console.log(`profile: ${profile}`);\n  });\n}\n\ngetProfile('dfox');\n```\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanillouz%2Fdevrant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanillouz%2Fdevrant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanillouz%2Fdevrant/lists"}