| Crates.io | stardots-sdk-rust |
| lib.rs | stardots-sdk-rust |
| version | 1.0.0 |
| created_at | 2025-06-26 10:09:10.048674+00 |
| updated_at | 2025-06-26 10:09:10.048674+00 |
| description | StarDots SDK for Rust |
| homepage | https://stardots.io |
| repository | https://github.com/stardots-io/stardots-sdk-rust |
| max_upload_size | |
| id | 1727133 |
| size | 207,102 |

This project is used to help developers quickly access the StarDots platform and is written in Rust.
Add this to your Cargo.toml:
[dependencies]
stardots-sdk-rust = "1.0.0"
Or install from git:
cargo add stardots-sdk-rust --git https://github.com/stardots-io/stardots-sdk-rust
use stardots_sdk_rust::{StarDots, CreateSpaceReq, UploadFileReq};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client_key = "Your client key";
let client_secret = "Your client secret";
let sdk = StarDots::new(client_key.to_string(), client_secret.to_string());
// Get space list
let space_list = sdk.get_space_list(Default::default()).await?;
// Create a new space
let create_result = sdk.create_space(CreateSpaceReq {
space: "my-space".to_string(),
public: true,
}).await?;
// Upload a file
let upload_result = sdk.upload_file(UploadFileReq {
filename: "example.txt".to_string(),
space: "my-space".to_string(),
file_content: b"Hello, StarDots!".to_vec(),
}).await?;
Ok(())
}
StarDots::new(client_key: String, client_secret: String) -> StarDotsStarDots::with_endpoint(client_key: String, client_secret: String, endpoint: String) -> StarDotsStarDots.get_space_list(params: SpaceListReq) -> Result<SpaceListResp>StarDots.create_space(params: CreateSpaceReq) -> Result<CreateSpaceResp>StarDots.delete_space(params: DeleteSpaceReq) -> Result<DeleteSpaceResp>StarDots.toggle_space_accessibility(params: ToggleSpaceAccessibilityReq) -> Result<ToggleSpaceAccessibilityResp>StarDots.get_space_file_list(params: SpaceFileListReq) -> Result<SpaceFileListResp>StarDots.file_access_ticket(params: FileAccessTicketReq) -> Result<FileAccessTicketResp>StarDots.upload_file(params: UploadFileReq) -> Result<UploadFileResp>StarDots.delete_file(params: DeleteFileReq) -> Result<DeleteFileResp>https://stardots.io/en/documentation/openapi