contentful_management

Crates.iocontentful_management
lib.rscontentful_management
version0.1.3
sourcesrc
created_at2024-05-20 19:30:53.919606
updated_at2024-06-12 07:04:03.083541
descriptionA Rust SDK for managing entities in Contentful.
homepage
repositoryhttps://github.com/neonwarp/contentful-management
max_upload_size
id1246101
size94,942
(neonwarp)

documentation

README

Contentful Management

contentful_management is a Rust library designed for seamless interaction with the Contentful Content Management API. This SDK facilitates the management of entries, assets, spaces, and environments within your Contentful space, supporting operations such as fetching, creating, updating, and deleting content. It is an ideal choice for integrating Contentful into your Rust applications.

Installation

To include the contentful_management library in your project, add the following to your Cargo.toml file:

[dependencies]
contentful_management = "0.1"

Usage

Below is an example of how to create a client and fetch a single entry using this library:

use contentful_management::ContentfulClient;
use tokio;

#[tokio::main]
async fn main() {
    let access_token = "your_access_token";
    let space_id = "your_space_id";
    let environment_id = "your_environment_id";

    let client = ContentfulClient::new(access_token);

    match client.entry.get(&space_id, &environment_id, "entry_id").await {
        Ok(entry) => {
            println!("Single Entry: {:?}", entry);
        }
        Err(e) => {
            eprintln!("Error: {}", e);
        }
    }
}
Commit count: 10

cargo fmt