#management #contentful #sdk #content #entry #space #assets

yanked contentful_management

A Rust SDK for managing entities in Contentful

1 unstable release

0.1.3 Jun 12, 2024
0.1.2 May 24, 2024
0.1.1 May 20, 2024
0.1.0 May 20, 2024

#66 in #entry

Download history 215/week @ 2024-05-15 158/week @ 2024-05-22 5/week @ 2024-05-29 7/week @ 2024-06-05 135/week @ 2024-06-12 2/week @ 2024-06-19

224 downloads per month

GPL-3.0 license

27KB
574 lines

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);
        }
    }
}

Dependencies

~4–15MB
~211K SLoC