{"id":19392078,"url":"https://github.com/j3lte/pastedeno","last_synced_at":"2025-04-24T01:32:36.594Z","repository":{"id":208280383,"uuid":"721249774","full_name":"j3lte/pastedeno","owner":"j3lte","description":"Universal Pastebin client for Deno/Node","archived":false,"fork":false,"pushed_at":"2024-09-05T23:42:28.000Z","size":141,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T23:02:33.978Z","etag":null,"topics":["deno","nodejs","paste","pastebin","pastebin-api","pastebin-js","pastebin-ts"],"latest_commit_sha":null,"homepage":"https://deno.land/x/pastedeno","language":"TypeScript","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/j3lte.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":"2023-11-20T16:59:08.000Z","updated_at":"2024-09-07T20:46:41.000Z","dependencies_parsed_at":"2023-11-24T10:47:57.440Z","dependency_job_id":null,"html_url":"https://github.com/j3lte/pastedeno","commit_stats":null,"previous_names":["j3lte/pastedeno"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j3lte%2Fpastedeno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j3lte%2Fpastedeno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j3lte%2Fpastedeno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j3lte%2Fpastedeno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j3lte","download_url":"https://codeload.github.com/j3lte/pastedeno/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249429665,"owners_count":21270488,"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":["deno","nodejs","paste","pastebin","pastebin-api","pastebin-js","pastebin-ts"],"created_at":"2024-11-10T10:30:23.909Z","updated_at":"2025-04-24T01:32:36.284Z","avatar_url":"https://github.com/j3lte.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/j3lte"],"categories":[],"sub_categories":[],"readme":"# PasteDeno\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/j3lte/pastedeno?style=for-the-badge)](https://github.com/j3lte/pastedeno/releases/latest \"GitHub release (latest by date)\")\n[![NPM Version](https://img.shields.io/npm/v/pastedeno?style=for-the-badge)](https://www.npmjs.com/package/pastedeno \"NPM Version\")\n[![GitHub Release Date](https://img.shields.io/github/release-date/j3lte/pastedeno?style=for-the-badge)](https://github.com/j3lte/pastedeno/releases/latest \"GitHub Release Date\")\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/j3lte/pastedeno?style=for-the-badge)\n[![GitHub](https://img.shields.io/github/license/j3lte/pastedeno?style=for-the-badge)](https://github.com/j3lte/pastedeno/blob/main/LICENSE \"GitHub License\")\n[![GitHub last commit](https://img.shields.io/github/last-commit/j3lte/pastedeno?style=for-the-badge)](https://github.com/j3lte/pastedeno/commits/main \"GitHub last commit\")\n[![GitHub issues](https://img.shields.io/github/issues/j3lte/pastedeno?style=for-the-badge)](https://github.com/j3lte/pastedeno/issues \"Github Issues\")\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/j3lte/pastedeno/test.yml?branch=main\u0026style=for-the-badge)](https://github.com/j3lte/pastedeno/actions/workflows/test.yml \"GitHub Workflow Status\")\n[![Codecov](https://img.shields.io/codecov/c/github/j3lte/pastedeno?style=for-the-badge\u0026token=RxcUQ1dItw)](https://codecov.io/gh/j3lte/pastedeno \"Codecov\")\n[![Deno docs](https://img.shields.io/badge/Deno-Docs-blue?style=for-the-badge)](https://doc.deno.land/https/deno.land/x/pastedeno/mod.ts \"Deno docs\")\n\nPastebin Client for Deno/Node\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/j3lte/pastedeno/main/assets/logo.png\"\u003e\n\u003c/p\u003e\n\n\u003e This is a continuation of [pastebin-ts](https://github.com/j3lte/pastebin-ts) and its predecessor [pastebin-js](https://github.com/j3lte/pastebin-js). The main difference between Pastedeno and its predecessors is that it is completely rewritten and uses less dependencies (and up-to-date ones). Alongside the Deno version a Node version is automatically published to NPM.\n\n## Capabilities\n\n### Pastebin API\n- Create a new paste (with optional title, format, privacy and expiration)\n- Get a paste (raw)\n- Delete a paste\n- Get user info\n- Get user pastes\n\n### Scraper [(PRO only)](https://pastebin.com/doc_scraping_api)\n- Scrape latest pastes\n- Get raw paste\n- Get paste metadata\n\n## Packages used\n\nFor the Deno version the following packages are used:\n- [xml](https://deno.land/x/xml) (for parsing XML) ([MIT License](https://github.com/lowlighter/xml/blob/main/LICENSE))\n- [evt](https://deno.land/x/evt) (for event handling in Scraper) ([MIT License](https://github.com/garronej/evt/blob/main/LICENSE))\n\nFor the Node version the following packages are used:\n- [fast-xml-parser](https://www.npmjs.com/package/fast-xml-parser) (for parsing XML) ([MIT License](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/LICENSE))\n- [evt](https://www.npmjs.com/package/evt) (for event handling in Scraper) ([MIT License](https://github.com/garronej/evt/blob/main/LICENSE))\n- [node-fetch](https://www.npmjs.com/package/node-fetch) (for fetching data) ([MIT License](https://github.com/node-fetch/node-fetch/blob/main/LICENSE.md))\n\n## API\n\nAPI Docs can be found on Deno Docs: [https://deno.land/x/pastedeno/mod.ts](https://deno.land/x/pastedeno/mod.ts)\n\n## Installation\n\n### Deno\n\n```ts\nimport { Pastebin } from \"https://deno.land/x/pastedeno/mod.ts\";\n```\n\n### Node\n\nRun `npm install pastedeno` or `yarn add pastedeno`\n\n```ts\nimport { Pastebin } from \"pastedeno\";\n```\n\n## Usage\n\n### Pastebin API\n\n```ts\nimport { Pastebin, PrivacyLevel, ExpirationTime } from \"https://deno.land/x/pastedeno/mod.ts\";\n\n// Create a new Pastebin instance\nconst pastebin = new Pastebin({\n  api_dev_key: \"\u003cYOUR API DEV KEY\u003e\",\n  api_user_name: \"\u003cYOUR USERNAME\u003e\",\n  api_user_password: \"\u003cYOUR PASSWORD\u003e\",\n})\n\n// Create a new paste\nconst paste = await pastebin.createPaste({\n    code: \"console.log('Hello World!')\",\n    title: \"Hello World\",\n    format: \"javascript\",\n    privacy: PrivacyLevel.PRIVATE,\n    expiration: ExpirationTime.ONE_DAY\n});\n// paste = 'https://pastebin.com/XXXXXXXX'\n\n// Get the raw paste (either use the paste url or the paste id)\nconst raw = await pastebin.getPaste('https://pastebin.com/XXXXXXXX');\n\n// Get the raw private paste\nconst rawPrivate = await pastebin.getPaste('https://pastebin.com/XXXXXXXX', true);\n\n// Delete the paste\nawait pastebin.deletePaste('\u003cpaste id\u003e');\n\n// Get user info\nconst userInfo = await pastebin.getUserInfo();\n\n// Get user pastes\nconst userPastes = await pastebin.listUserPastes();\n\n// Set debug mode\npastebin.setDebug(true);\n```\n\n### Scraper [(PRO only)](https://pastebin.com/doc_scraping_api)\n\n```ts\nimport { Scraper } from \"https://deno.land/x/pastedeno/mod.ts\";\n\nconst scraper = new Scraper({\n  intervalTime: 5000,\n  limit: 10,\n});\n\nscraper.on(\"scrape\", (data) =\u003e {\n  console.table(data);\n});\n\nscraper.on(\"new\", (data) =\u003e {\n  console.log(`New paste: ${data.key}`);\n});\n\nscraper.on(\"error\", (error) =\u003e {\n  console.error(error);\n});\n\nscraper.start();\n```\n\n## License\n\n[MIT](LICENSE)\n\n---\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/j3lte)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj3lte%2Fpastedeno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj3lte%2Fpastedeno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj3lte%2Fpastedeno/lists"}