Nylas Rust SDK
💌 A Rust client library for the Nylas email and calendar API.
Overview
This Nylas Rust SDK is a library that provides Rust developers with easy access to the Nylas email and calendar API. Nylas is a powerful platform for building email, calendar, and contact functionality into applications.
🌟 Key Features:
- Retrieve email messages, threads, and threads.
- Access event and calendar information.
- Interact with folders, labels, and tags.
- Manage accounts and account details.
- Utilize powerful search and filter capabilities.
- And much more!
🚀 This client library empowers you to integrate the Nylas API seamlessly into your Rust applications.
Installation
To include the Nylas Rust SDK in your project, add it as a dependency in your Cargo.toml file:
[]
= "0.0.7"
= "1.33.0"
You can find the latest version on Crates.io.
Usage
🔐 Authentication: Start by setting up authentication and obtaining an access token.
use Nylas;
async
📧 Retrieve All Messages: Fetch all messages from the Nylas API.
// ...
// Call the all method to retrieve all messages
let messages = nylas.messages.all.await;
match messages
🔍 Search for Messages: Search for messages based on a query.
// ...
// Call the `search` method to search for messages
let query = "user@example.com";
let limit = Some;
let offset = Some;
let result = nylas.messages.search.await;
match result
🔍 Filter Messages: Filter messages based on specified criteria with an optional view parameter.
// ...
// Define filter parameters as a HashMap
let mut filter = new;
filter.insert;
// Call the `where_` method with filter and view parameters
let messages = nylas.messages.where_.await;
match messages
📨 Retrieve the First Message: Get the most recent message from the Nylas API.
// ...
let message_result = nylas.messages.first.await;
match message_result
🔍 Retrieve a Specific Message by ID: Get a specific message by its ID.
// ...
let message_id = "YOUR_MESSAGE_ID";
let message_result = nylas.messages.get.await;
match message_result
Explore the examples folder for more usage scenarios.
Documentation
For detailed documentation, including available functions and structures, refer to the official documentation.
Contributing
We welcome contributions from the open-source community! If you'd like to contribute to the Nylas Rust Client, please read our Contributing Guidelines.
License
This project is licensed under the MIT License.