{"id":21388458,"url":"https://github.com/keiryojs/rest","last_synced_at":"2026-05-20T09:08:43.857Z","repository":{"id":46182565,"uuid":"361522986","full_name":"KeiryoJS/rest","owner":"KeiryoJS","description":"👽️ typescript library for interacting with Discord's REST api","archived":false,"fork":false,"pushed_at":"2023-06-27T02:54:17.000Z","size":61,"stargazers_count":1,"open_issues_count":11,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-04-27T16:20:24.597Z","etag":null,"topics":["ava","discord","neocord","typescript","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/KeiryoJS.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,"governance":null}},"created_at":"2021-04-25T19:46:18.000Z","updated_at":"2021-09-27T02:22:32.000Z","dependencies_parsed_at":"2023-07-18T04:19:18.709Z","dependency_job_id":null,"html_url":"https://github.com/KeiryoJS/rest","commit_stats":{"total_commits":8,"total_committers":3,"mean_commits":"2.6666666666666665","dds":0.5,"last_synced_commit":"79027cabac33fcb00d204f1220b94d0d025306a0"},"previous_names":["neo-cord/rest"],"tags_count":0,"template":false,"template_full_name":"KeiryoJS/typescript-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeiryoJS%2Frest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeiryoJS%2Frest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeiryoJS%2Frest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeiryoJS%2Frest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KeiryoJS","download_url":"https://codeload.github.com/KeiryoJS/rest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243871524,"owners_count":20361375,"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":["ava","discord","neocord","typescript","unit-testing"],"created_at":"2024-11-22T12:17:58.030Z","updated_at":"2026-05-20T09:08:43.784Z","avatar_url":"https://github.com/KeiryoJS.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Keiryo REST\n\n\u003e Simple REST library used within [keiryo](https://npmjs.com/KeiryoJS/keiryo)\n\n- [Discord Server](https://discord.gg/5WD9KhF)\n- [GitHub Repository](https://github.com/KeiryoJS/rest)\n\n**node.js v14** or newer is required.\n\n```shell script\nyarn add @keiryo/rest\n```\n\n## Basic Usage\n\n```ts\nimport { RestClient, cdn } from \"@keiryo/rest\";\nimport { request } from \"undici\";\n\nconst api = new RestClient();\n\n// You must set the token if you want to use the RestHandler, cdn doesn't require authorization.\napi.token = \"your token here\"\n\n// All (iirc) REST routes return JSON, the CDN does not.\napi.get(\"/users/@me\").then(console.log);\n...\n\n// If you want to use the CDN you need to use petitio, or another http client of your choice.\nconst defaultAvatar = await request(cdn.defaultAvatar(5773 % 5));\nconst data = await defaultAvatar.body.arrayBuffer();\nconsole.log(Buffer.from(data)) // =\u003e \u003cBuffer 89 50 4e 47...\u003e\n```\n\n---\n\n\u003cp align=\"center\"\u003eLicensed under the \u003cstrong\u003eApache 2.0\u003c/strong\u003e License\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeiryojs%2Frest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeiryojs%2Frest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeiryojs%2Frest/lists"}