{"id":13718452,"url":"https://github.com/jayeshsolanki93/devgorant","last_synced_at":"2025-05-07T10:32:11.735Z","repository":{"id":57480126,"uuid":"65188562","full_name":"jayeshsolanki93/devgorant","owner":"jayeshsolanki93","description":"Unofficial golang wrapper for the devrant API","archived":false,"fork":false,"pushed_at":"2016-08-10T17:20:04.000Z","size":11,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-04T01:11:23.998Z","etag":null,"topics":["devgorant","devrant","golang","golang-wrapper","rant"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/jayeshsolanki93/devgorant","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/jayeshsolanki93.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-08-08T08:52:29.000Z","updated_at":"2023-05-27T17:39:15.000Z","dependencies_parsed_at":"2022-09-18T05:48:51.425Z","dependency_job_id":null,"html_url":"https://github.com/jayeshsolanki93/devgorant","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/jayeshsolanki93%2Fdevgorant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayeshsolanki93%2Fdevgorant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayeshsolanki93%2Fdevgorant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayeshsolanki93%2Fdevgorant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jayeshsolanki93","download_url":"https://codeload.github.com/jayeshsolanki93/devgorant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224585566,"owners_count":17335877,"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":["devgorant","devrant","golang","golang-wrapper","rant"],"created_at":"2024-08-03T01:00:27.929Z","updated_at":"2024-11-14T07:31:20.670Z","avatar_url":"https://github.com/jayeshsolanki93.png","language":"Go","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# devgorant [![GoDoc](https://godoc.org/github.com/jayeshsolanki93/devgorant?status.svg)](https://godoc.org/github.com/jayeshsolanki93/devgorant) [![Build Status](https://travis-ci.org/jayeshsolanki93/devgorant.svg?branch=master)](https://travis-ci.org/jayeshsolanki93/devgorant)\n\nUnofficial golang wrapper for the [devRant API](https://www.devrant.io/)\n\n## Installation\n```bash\ngo get github.com/jayeshsolanki93/devgorant\n```\n\n## Usage\nSimple implementation to get the user score(points):\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n  \"github.com/jayeshsolanki93/devgorant\"\n  \"log\"\n)\n\nfunc main() {\n  devrant := devgorant.New()\n  user, _, err := devrant.Profile(\"jayeshs\")\n  if err != nil {\n    log.Fatal(err)\n  }\n  fmt.Println(user.Score)\n}\n```\n\n\n## API Reference\n\n### `Rants` : Fetches rants\n\n**Parameters:**\n\n| Name | Type | Description | Default |\n| ---- | ---- | -------- | ----------- | ------- |\n| `sort` | string | Sort by `algo`, `top`, `recent` | `algo` |\n| `limit` | integer | Number of rants required. Cannot be more than 50. | 50 |\n| `skip` | integer | Number of rants to skip. | 0 |\n\n**Example:**\n```go\ndevrant := devgorant.New()\nrants, err := devrant.Rants(\"algo\", 20, 0)\n```\n---\n### `Rant` : Fetches a rant and its comments given a valid rant id\n\n**Parameters:**\n\n| Name | Type | Description | Default |\n| ---- | ---- | -------- | ----------- | ------- |\n| `rantId` | integer | rant_id of a posted rant |  |\n\n**Example:**\n```go\ndevrant := devgorant.New()\nrant, comments, err := devrant.Rant(27317)\n```\n---\n### `Profile` : Fetches ranter's profile data\n\n**Parameters:**\n\n| Name | Type | Description | Default |\n| ---- | ---- | -------- | ----------- | ------- |\n| `username` | string | a valid username on devRant |  |\n\n**Example:**\n```go\ndevrant := devgorant.New()\nuser, content, err := devrant.Profile(\"jayeshs\")\n```\n---\n### `Search` : Search for rants matching the search term\n\n**Parameters:**\n\n| Name | Type | Description | Default |\n| ---- | ---- | -------- | ----------- | ------- |\n| `term` | string | any string to use as the search term |  |\n\n**Example:**\n```go\ndevrant := devgorant.New()\nrants, err := devrant.Search(\"golang\")\n```\n---\n### `Surprise` : Returns a random rant\n\n**Example:**\n```go\ndevrant := devgorant.New()\nrant, err := devrant.Surprise()\n```\n---\n### `WeeklyRants` : Returns the rants tagged for 'weekly'\n\n**Example:**\n```go\ndevrant := devgorant.New()\nrants, err := devrant.WeeklyRants()\n```\n---\n\n## Tests\nTo run the tests locally:\n```bash\ngo test -v \n```\n\n## TODO\n// TODO\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayeshsolanki93%2Fdevgorant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjayeshsolanki93%2Fdevgorant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayeshsolanki93%2Fdevgorant/lists"}