contentstack-api-client-rs
Async Rust HTTP client for the Contentstack CMS API.
- Delivery API - fetch entries from the CDN (available)
- Management API - CRUD on entries, assets, content types (planned)
Installation
[]
= "0.1"
Quick Start
use Deserialize;
use ;
use json;
async
Configuration
use ;
use Duration;
let client = new;
Supported regions
| Region | Delivery URL |
|---|---|
AwsNa (default) |
https://cdn.contentstack.io |
AwsEu |
https://eu-cdn.contentstack.com |
AwsAu |
https://au-cdn.contentstack.com |
AzureNa |
https://azure-na-cdn.contentstack.com |
AzureEu |
https://azure-eu-cdn.contentstack.com |
GcpNa |
https://gcp-na-cdn.contentstack.com |
GcpEu |
https://gcp-eu-cdn.contentstack.com |
Custom Entry Fields
Define a struct for your content type's custom fields - system fields (uid, title, locale, etc.) are always included automatically:
use Deserialize;
use Entry;
// entry: Entry<BlogPost>
// entry.uid - system field
// entry.title - system field
// entry.fields.body - your custom field
MSRV
Rust 1.93.1 or later. Edition 2024.
Contributing
Commits must follow Conventional Commits - enforced by CI:
| Prefix | Effect |
|---|---|
feat: |
minor version bump |
fix: |
patch version bump |
feat!: / BREAKING CHANGE: |
major version bump |
chore:, docs:, ci: |
no version bump |
Making a Release
Releases are fully automated via release-plz:
- Merge one or more PRs to
mainwith Conventional Commit messages - release-plz automatically opens a release PR with an updated
Cargo.tomlversion andCHANGELOG.md - Review and merge the release PR
- release-plz tags the commit, publishes to crates.io, and creates a GitHub release
No manual tagging or version bumping required.
License
Licensed under either of MIT or Apache-2.0 at your option.