{"id":13602125,"url":"https://github.com/jlarmstrongiv/bunny-client","last_synced_at":"2025-07-26T08:32:55.386Z","repository":{"id":157864023,"uuid":"633687529","full_name":"jlarmstrongiv/bunny-client","owner":"jlarmstrongiv","description":"The TypeScript API Client for BunnyCDN","archived":false,"fork":false,"pushed_at":"2024-09-08T15:54:54.000Z","size":775,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-19T19:02:19.217Z","etag":null,"topics":["api","bunny","bunny-cdn","bunny-client","bunnycdn","bunnynet","cdn","typescript"],"latest_commit_sha":null,"homepage":"https://bunny-launcher.net/bunny-sdk/languages/typescript/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jlarmstrongiv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-28T04:01:04.000Z","updated_at":"2024-11-12T17:28:00.000Z","dependencies_parsed_at":"2024-03-26T21:26:25.262Z","dependency_job_id":"8019fcd9-12c2-4d7d-a24f-1b6579acff15","html_url":"https://github.com/jlarmstrongiv/bunny-client","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jlarmstrongiv/bunny-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlarmstrongiv%2Fbunny-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlarmstrongiv%2Fbunny-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlarmstrongiv%2Fbunny-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlarmstrongiv%2Fbunny-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlarmstrongiv","download_url":"https://codeload.github.com/jlarmstrongiv/bunny-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlarmstrongiv%2Fbunny-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267140681,"owners_count":24041970,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","bunny","bunny-cdn","bunny-client","bunnycdn","bunnynet","cdn","typescript"],"created_at":"2024-08-01T18:01:14.652Z","updated_at":"2025-07-26T08:32:54.906Z","avatar_url":"https://github.com/jlarmstrongiv.png","language":"TypeScript","funding_links":[],"categories":["api"],"sub_categories":[],"readme":"# `bunny-client` The TypeScript API Client for BunnyCDN 🐰\n\n\u003e [!IMPORTANT]  \n\u003e Please use [`bunny-sdk-typescript`](https://github.com/jlarmstrongiv/bunny-sdk-typescript) instead. This repository is now in maintenance mode.\n\n## Motivation\n\nProvide an unofficial TypeScript API Client for BunnyCDN with few dependencies.\n\n## Documentation\n\n- [quick start guide](https://github.com/jlarmstrongiv/bunny-client#quick-start)\n- [official API documentation](https://docs.bunny.net/docs)\n- [generated TypeScript documentation](https://bunny-client.surge.sh)\n\n\u003c!-- Better documentation in comments than the official api! --\u003e\n\n### Supported APIs\n\n\u003c!--\n\n- TODO: link each client to the official documentation like `defineConfig` from Astro\n\n- use the unofficial api to take note of warnings and default values https://toshy.github.io/BunnyNet-PHP/edge-storage-api/#reference\n\n- private apis\n  - abuse and dmca endpoint\n    - https://toshy.github.io/BunnyNet-PHP/base-api/#abuse-case\n    - https://github.com/ToshY/BunnyNet-PHP/issues/55\n  - billing\n    - https://toshy.github.io/BunnyNet-PHP/base-api/#billing\n    - https://github.com/ToshY/BunnyNet-PHP/issues/34\n    - https://github.com/ToshY/BunnyNet-PHP/issues/58\n  - compute\n    - https://toshy.github.io/BunnyNet-PHP/base-api/#compute\n    - https://docs.bunny.net/reference/computeedgescriptpublic_addscript\n  - drm certificates\n    - https://toshy.github.io/BunnyNet-PHP/base-api/#drm-certificate\n  - user\n    - https://toshy.github.io/BunnyNet-PHP/base-api/#user\n    - https://docs.bunny.net/reference/userpublic_index\n    - https://docs.bunny.net/reference/userpublic_dpa\n  - api keys\n    - https://docs.bunny.net/reference/apikeypublic_listapikeys\n    - https://web.archive.org/web/20230428220030/https://docs.bunny.net/reference/apikeypublic_listapikeys\n  - other\n    - https://toshy.github.io/BunnyNet-PHP/image-processing/\n    - https://toshy.github.io/BunnyNet-PHP/token-authentication/\n    - https://github.com/BunnyWay/BunnyCDN.TokenAuthentication/blob/master/nodejs/token.js\n  - documentation vs api reference https://docs.bunny.net/docs/cdn-logging\n  - optimizer\n    - https://support.bunny.net/hc/en-us/articles/360027448392-Bunny-Optimizer-Engine-Documentation\n    - https://docs.bunny.net/docs/stream-image-processing\n\n  - consider writing a surge.sh cli alternative\n  - consider a react-query client\n  - consider nextjs examples\n  - documentation site https://nextra.site/\n\n  - tus https://docs.bunny.net/reference/tus-resumable-uploads\n    - https://www.npmjs.com/package/tus-js-client\n    - https://www.npmjs.com/package/tus\n    - https://www.npmjs.com/package/use-tus\n    - https://www.npmjs.com/package/@uppy/tus\n\n--\u003e\n\n- 🏗️ API\n  - ✅ Countries\n    - ✅ Get Country List\n  - ✅ Support\n    - ✅ Get Ticket List\n    - ✅ Get Ticket Details\n    - ✅ Close Ticket\n    - ✅ Reply Ticket\n    - ✅ Create Ticket\n  - ✅ Region\n    - ✅ Region List\n  - 🏗️ Stream Video Library\n  - 🏗️ DNS Zone\n  - 🏗️ Pull Zone\n    - 🏗️ List Pull Zones\n    - 🏗️ Add Pull Zone\n    - 🏗️ Get Pull Zone\n    - 🏗️ Update Pull Zone\n    - 🏗️ Delete Pull Zone\n    - 🏗️ Delete Edge Rule\n    - 🏗️ Add/Update Edge Rule\n    - 🏗️ Set Edge Rule Enabled\n    - 🏗️ Get Origin Shield Queue Statistics\n    - 🏗️ Get SafeHop Statistics\n    - 🏗️ Get Optimizer Statistics\n    - 🏗️ Load Free Certificate\n    - 🏗️ Purge Cache\n    - 🏗️ Check the pull zone availability\n    - 🏗️ Add Custom Certificate\n    - 🏗️ Remove Certificate\n    - 🏗️ Add Custom Hostname\n    - 🏗️ Remove Custom Hostname\n    - 🏗️ Set Force SSL\n    - 🏗️ Reset token Key\n    - 🏗️ Add Allowed Referer\n    - 🏗️ Remove Allowed Referer\n    - 🏗️ Add Blocked Referer\n    - 🏗️ Remove Blocked Referer\n    - 🏗️ Add Blocked IP\n    - 🏗️ Remove Blocked IP\n  - 🏗️ Purge\n  - ✅ Statistics\n    - ✅ Get Statistics\n  - ✅ Storage Zone\n    - ✅ List Storage Zones\n    - ✅ Add Storage Zone\n    - ✅ Check the Storage Zone Availability\n    - ✅ Get Storage Zone\n    - ✅ Update Storage Zone\n    - ✅ Delete Storage Zone\n    - ✅ Get Storage Zone Statistics\n    - ✅ Reset Password\n    - ✅ Reset Read-Only Password\n- ✅ Edge Storage API\n  - ✅ Manage Files\n    - ✅ Download File\n    - ✅ Upload File\n    - ✅ Delete File\n  - ✅ Browse Files\n    - ✅ List Files\n- 🏗️ Stream API\n  - 🏗️ TUS\n  - 🏗️ Manage Collections\n  - 🏗️ Manage Videos\n\n## Quick start\n\n\u003c!-- types --\u003e\n\u003c!-- https://app.quicktype.io/?l=ts --\u003e\n\u003c!-- https://transform.tools/json-to-typescript --\u003e\n\n\u003c!-- avoiding zod due to performance concerns --\u003e\n\u003c!-- https://github.com/colinhacks/zod/issues/205 --\u003e\n\u003c!-- https://www.reddit.com/r/typescript/comments/13sldut/how_do_people_use_zod_on_a_large_project/ --\u003e\n\n### Installation\n\nInstall via [npm](https://www.npmjs.com/package/bunny-client):\n\n```shell\nnpm install bunny-client\n```\n\n### Required polyfills\n\n- `fetch` API\n- Web Streams API\n\nSupports [Node.js 18+](https://nodejs.org/en/blog/announcements/v18-release-announce#fetch-experimental) and [evergreen browsers](https://caniuse.com/fetch)\n\n### Account Access Key\n\n\u003c!-- https://www.jhanley.com/blog/bunny-client-account-and-api-keys/ --\u003e\n\n\u003c!-- some api keys cannot be created with an entity, such as zones --\u003e\n\nGet your API Key from your [account settings](https://dash.bunny.net/account/settings)\n\nAPI Key example:\n\n```\ncb1a7c68-89a0-462a-9495-13ebd7366cfe\n```\n\n### Client\n\n\u003c!-- GET /url format https://stackoverflow.com/a/16230133 --\u003e\n\nEach client matches with a menu item in the Bunny CDN [docs](https://docs.bunny.net/reference/bunnynet-api-overview)\n\n1. Import the client\n1. Optionally set globals, like the `apiKey`\n1. Use the client methods to call the API\n\nThe main differences between the API and the TypeScript Client are:\n\n- `camelCase` inputs and outputs to match TypeScript style guides\n- `tsdoc` examples for all inputs and outputs\n- Replace the generic `AccessKey` with `apiKey` and `storageZonePassword`\n- More default parameters\n\n\u003c!-- TODO: storageZoneClient input to lowercase refactor --\u003e\n\n```ts\nconst storageZoneClient = createStorageZoneClient({\n  apiKey: API_ACCESS_KEY,\n});\n\nconst response = await storageZoneClient(\"addStorageZone\", {\n  Name: \"api-example\",\n  Region: \"NY\",\n  ZoneTier: 1,\n});\n```\n\n## License\n\n\u003c!-- consider adding to https://github.com/NuroDev/untypeable --\u003e\n\n\u003c!-- https://creativecommons.org/choose/ --\u003e\n\u003c!-- https://chooser-beta.creativecommons.org/ --\u003e\n\u003c!-- https://github.com/idleberg/Creative-Commons-Markdown --\u003e\n\n\u003cp xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dct=\"http://purl.org/dc/terms/\"\u003e\u003ca property=\"dct:title\" rel=\"cc:attributionURL\" href=\"https://github.com/jlarmstrongiv/bunny-client/\"\u003ebunny-client\u003c/a\u003e by \u003ca rel=\"cc:attributionURL dct:creator\" property=\"cc:attributionName\" href=\"https://github.com/jlarmstrongiv/\"\u003eJohn L. Armstrong IV\u003c/a\u003e is licensed under \u003ca href=\"http://creativecommons.org/licenses/by-nc-sa/4.0/?ref=chooser-v1\" target=\"_blank\" rel=\"license noopener noreferrer\" style=\"display:inline-block;\"\u003eAttribution-NonCommercial-ShareAlike 4.0 International\u003cbr\u003e\u003cimg style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1\"\u003e\u003cimg style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1\"\u003e\u003cimg style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1\"\u003e\u003cimg style=\"height:22px!important;margin-left:3px;vertical-align:text-bottom;\" src=\"https://mirrors.creativecommons.org/presskit/icons/sa.svg?ref=chooser-v1\"\u003e\u003c/a\u003e\u003c/p\u003e\n\nAlternative licenses available by request.\n\n## Contributing\n\nPRs welcome! All contributors must sign the CLA Agreement so that the project license can be changed to MIT when sponsored. Thank you for your contributions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlarmstrongiv%2Fbunny-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlarmstrongiv%2Fbunny-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlarmstrongiv%2Fbunny-client/lists"}