|
| 1 | +<div align="center"> |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +<h1 align="center">@storyblok/api-client</h1> |
| 6 | + <p> |
| 7 | + A modern TypeScript client for the Storyblok Content Delivery API with built-in caching, retry logic, and rate limiting |
| 8 | + </p> |
| 9 | + <br /> |
| 10 | +</div> |
| 11 | + |
| 12 | +<p align="center"> |
| 13 | + <a href="https://npmjs.com/package/@storyblok/api-client"> |
| 14 | + <img src="https://img.shields.io/npm/v/@storyblok/api-client/latest.svg?style=flat-square&color=8d60ff" alt="@storyblok/api-client" /> |
| 15 | + </a> |
| 16 | + <a href="https://npmjs.com/package/@storyblok/api-client" rel="nofollow"> |
| 17 | + <img src="https://img.shields.io/npm/dt/@storyblok/api-client.svg?style=appveyor&color=8d60ff" alt="npm"> |
| 18 | + </a> |
| 19 | + <a href="https://storyblok.com/join-discord"> |
| 20 | + <img src="https://img.shields.io/discord/700316478792138842?label=Join%20Our%20Discord%20Community&style=appveyor&logo=discord&color=8d60ff"> |
| 21 | + </a> |
| 22 | + <a href="https://twitter.com/intent/follow?screen_name=storyblok"> |
| 23 | + <img src="https://img.shields.io/badge/Follow-%40storyblok-8d60ff?style=appveyor&logo=twitter" alt="Follow @Storyblok" /> |
| 24 | + </a><br/> |
| 25 | + <a href="https://app.storyblok.com/#!/signup?utm_source=github.com&utm_medium=readme&utm_campaign=@storyblok/api-client"> |
| 26 | + <img src="https://img.shields.io/badge/Try%20Storyblok-Free-8d60ff?style=appveyor&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAHqADAAQAAAABAAAAHgAAAADpiRU/AAACRElEQVRIDWNgGGmAEd3D3Js3LPrP8D8WXZwSPiMjw6qvPoHhyGYwIXNAbGpbCjbzP0MYuj0YFqMroBV/wCxmIeSju64eDNzMBJUxvP/9i2Hnq5cM1devMnz984eQsQwETeRhYWHgIcJiXqC6VHlFBjUeXgav40cIWkz1oLYXFmGwFBImaDFBHyObcOzdW4aSq5eRhRiE2dgYlpuYoYSKJi8vw3GgWnyAJIs/AuPu4scPGObd/fqVQZ+PHy7+6udPOBsXgySLDfn5GRYYmaKYJcXBgWLpsx8/GPa8foWiBhuHJIsl2DkYQqWksZkDFgP5PObcKYYff//iVAOTIDlx/QPqRMb/YSYBaWlOToZIaVkGZmAZSQiQ5OPtwHwacuo4iplMQEu6tXUZMhSUGDiYmBjylFQYvv/7x9B04xqKOnQOyT5GN+Df//8M59ASXKyMHLoyDD5JPtbj42OYrm+EYgg70JfuYuIoYmLs7AwMjIzA+uY/zjAnyWJpDk6GOFnCvrn86SOwmsNtKciVFAc1ileBHFDC67lzG10Yg0+SjzF0ownsf/OaofvOLYaDQJoQIGix94ljv1gIZI8Pv38zPvj2lQWYf3HGKbpDCFp85v07NnRN1OBTPY6JdRSGxcCw2k6sZuLVMZ5AV4s1TozPnGGFKbz+/PE7IJsHmC//MDMyhXBw8e6FyRFLv3Z0/IKuFqvFyIqAzd1PwBzJw8jAGPfVx38JshwlbIygxmYY43/GQmpais0ODDHuzevLMARHBcgIAQAbOJHZW0/EyQAAAABJRU5ErkJggg==" alt="Follow @Storyblok" /> |
| 27 | + </a> |
| 28 | +</p> |
| 29 | + |
| 30 | +## Features |
| 31 | + |
| 32 | +- **Type-Safe**: Generated from OpenAPI specifications with full TypeScript support |
| 33 | +- **Caching**: Pluggable cache providers with `cache-first`, `network-first`, and `swr` strategies |
| 34 | +- **Retry Logic**: Built-in retry with exponential backoff and jitter |
| 35 | +- **Rate Limiting**: Preventive rate limiting with automatic tier detection |
| 36 | +- **Region Support**: Automatic regional endpoint selection (`eu`, `us`, `ap`, `ca`, `cn`) |
| 37 | +- **Relation Inlining**: Optional inlining of resolved relations directly into story content |
| 38 | + |
| 39 | +## Documentation |
| 40 | + |
| 41 | +For complete documentation, please visit [package reference](https://www.storyblok.com/docs/packages/storyblok-api-client) |
| 42 | + |
| 43 | +## Contributing |
| 44 | + |
| 45 | +If you'd like to contribute, please refer to the [contributing guidelines](../../CONTRIBUTING.md). |
| 46 | + |
| 47 | +## Community |
| 48 | + |
| 49 | +For help, discussion about best practices, or any other conversation that would benefit from being searchable: |
| 50 | + |
| 51 | +- [Discuss Storyblok on GitHub Discussions](https://github.com/storyblok/monoblok/discussions) |
| 52 | + |
| 53 | +For community support, chatting with other users, please visit: |
| 54 | + |
| 55 | +- [Discuss Storyblok on Discord](https://storyblok.com/join-discord) |
| 56 | + |
| 57 | +## Support |
| 58 | + |
| 59 | +For bugs or feature requests, please [submit an issue](https://github.com/storyblok/monoblok/issues/new/choose). |
| 60 | + |
| 61 | +> [!IMPORTANT] |
| 62 | +> Please search existing issues before submitting a new one. Issues without a minimal reproducible example will be closed. [Why reproductions are Required](https://antfu.me/posts/why-reproductions-are-required). |
| 63 | +
|
| 64 | +### I can't share my company project code |
| 65 | + |
| 66 | +We understand that you might not be able to share your company's project code. Please provide a minimal reproducible example that demonstrates the issue by using tools like [Stackblitz](https://stackblitz.com) or a link to a GitHub repo. Please make sure you include a README file with the instructions to build and run the project, important not to include any access token, password or personal information of any kind. |
| 67 | + |
| 68 | +### Feedback |
| 69 | + |
| 70 | +If you have a question, please ask in the [Discuss Storyblok on Discord](https://storyblok.com/join-discord) channel. |
| 71 | + |
| 72 | +## License |
| 73 | + |
| 74 | +[License](/LICENSE) |
0 commit comments