oxide_todo_sdk

Crates.iooxide_todo_sdk
lib.rsoxide_todo_sdk
version0.1.0-pre.0
sourcesrc
created_at2023-02-28 12:13:55.959467
updated_at2023-02-28 12:13:55.959467
descriptionRust SDK for the Oxide Todo API
homepage
repositoryhttps://github.com/TheAwiteb/oxide_todo_sdk
max_upload_size
id796979
size52,568
Mohammed Alotaibi (TheAwiteb)

documentation

https://docs.rs/oxide_todo_sdk

README

Oxide Todo SDK

A asynchronous SDK (Software Development Kit) for oxide_todo written in Rust. It provides a simple API to interact with the server.

MSRV (Minimum Supported Rust Version)

The minimum supported Rust version is 1.64.0. (Recommended during development)

Usage

Add this to your Cargo.toml:

[dependencies]
oxide_todo_sdk = "0.1.0"

Examples

This example shows how to create a new todo:

use oxide_todo_sdk::types::TodoStatus;
use oxide_todo_sdk::Client;
use oxide_todo_sdk::errors::Result as OxideTodoResult;

#[tokio::main]
async fn main() -> OxideTodoResult<()> {
    let todo = Client::new("http://localhost:8080")
        .login("username", "password")
        .await? // Type: oxide_todo_sdk::types::User
        .create_todo("title") // Type: oxide_todo_sdk::types::Todo
        .set_status(TodoStatus::Completed) // Type: oxide_todo_sdk::types::Todo
        .await?; // Type: oxide_todo_sdk::types::Todo
    println!("Todo created: {todo:?}");
    // ^ This need `debug` feature
    Ok(())
}

As you can see above, the SDK is flexible and you can await the Todo type directly.

Check out the documentation for more information. Also check out the examples for more examples.

Features

  • Authentication
    • Register
    • Login
    • Revoke Token
  • Todos
    • Create Todo
    • Get Todo
    • Update Todo
    • Delete Todo
    • List Todos (including search)
    • Delete All Todos
  • [Server Metadata]
    • Get Server Metadata

Contributing

If you want to contribute to this project, feel free to open a pull request. If you want to add a new feature, please open an issue first. If you have any questions, feel free to open an issue.

Code of Conduct

This project adheres to the Rust Code of Conduct. By participating, you are expected to uphold this code.

License

This project is licensed under the terms of the MIT license. See LICENSE for more information.

Commit count: 36

cargo fmt