{"id":13718419,"url":"https://github.com/hex2f/RantScript","last_synced_at":"2025-05-07T10:31:59.917Z","repository":{"id":46980151,"uuid":"76961173","full_name":"hex2f/RantScript","owner":"hex2f","description":"A JavaScript wrapper for the FULL devRant API","archived":false,"fork":false,"pushed_at":"2020-11-17T14:51:45.000Z","size":460,"stargazers_count":30,"open_issues_count":4,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-23T06:54:08.147Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/hex2f.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-12-20T14:00:13.000Z","updated_at":"2021-04-01T15:32:34.000Z","dependencies_parsed_at":"2022-08-27T10:40:29.845Z","dependency_job_id":null,"html_url":"https://github.com/hex2f/RantScript","commit_stats":null,"previous_names":["rekkyrek/rantscript"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex2f%2FRantScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex2f%2FRantScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex2f%2FRantScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex2f%2FRantScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hex2f","download_url":"https://codeload.github.com/hex2f/RantScript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224175772,"owners_count":17268389,"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:26.870Z","updated_at":"2024-11-14T07:31:16.115Z","avatar_url":"https://github.com/hex2f.png","language":"JavaScript","readme":"![banner image](https://github.com/RekkyRek/RantScript/raw/master/images/RantScript.png)\n\n### RantScript allows you to access the whole devRant API via JS.\n\n##\n\n### Install\n```javascript\nnpm install rantscript\n```\n### Examples\n\n#### Console logging the 10 top posts on devRant:\n\n```javascript\nvar devRant = require('rantscript');\n\ndevRant\n  .rants('top', 10, 0)\n  .then((response)=\u003e{\n    console.log(response);\n  })\n```\n\n#### Enableing debug mode and compression:\n\n```javascript\nvar devRant = require('rantscript');\ndevRant.httpSettings.SET_DEBUG(true);\nconsole.log(devrant.httpSettings.GET_DEBUG());\n//Returns True\n\ndevRant.httpSettings.SET_COMPRESS(true);\nconsole.log(devrant.httpSettings.GET_COMPRESS());\n//Returns True\n```\n#### Logging in and posting a rant:\n\n```javascript\nvar devRant = require('rantscript');\n\n//Get authentication token from devRant API\ndevRant\n  .login('username', 'password')\n  .then((response)=\u003e{\n  \t//Then post a rant to devRant with token gotten from previous request.\n\n  \tdevRant.postRant(\n      \"Rant Text\",\n      \"Tags, Separated, By, Commas\",\n      response[\"auth_token\"]\n    ).then((resp)=\u003e{\n      //Then console.log the rant data.\n      console.log(resp);\n    })\n  })\n```\n\n##\n\n### All Functions\n| Function     | Usage                                             | Description               |\n| ------------ | ------------------------------------------------- | ------------------------- |\n| .rants       | .rants('sort', limit, skip, token)                | Load rants.               |\n| .rant        | .rant(rant_id)                                    | Load a single rant by id. |\n| .search      | .search('search term')                            | Search on devRant         |\n| .profile     | .profile('Username')                              | Load a profile by name    |\n| .login       | .login('Username','Password')                     | Get a devRant auth token  |\n| .postRant    | .postRant('Rant', 'Tags', token)                  | Post a rant to devRant    |\n| .postComment | .postComment('Comment', rant_id, token)           | Post a comment to a rant  |\n| .vote        | .vote(\u003c0 = down \u0026 1 = up\u003e, rant_id, token)        | Vote on a rant            |\n| .voteComment | .voteComment(\u003c0 = down \u0026 1 = up\u003e, rant_id, token) | Vote on a comment         |\n| .httpSettings| See Bellow | Change settings for the http requests|\n\n### All Settings\n| Function     | Usage                                                 |\n| ------------ | ----------------------------------------------------- |\n| .GET_DEBUG()                  | Returns the current Debug state.     |   \n| .SET_DEBUG(true or false)     | Enable or disable console.log        |\n| .GET_COMPRESS()               | Returns the current Compress state.  |\n| .SET_COMPRESS(true or false)  | Enable or disable compression.       |\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex2f%2FRantScript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhex2f%2FRantScript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex2f%2FRantScript/lists"}