[−][src]Crate onedrive_api
onedrive-api
The onedrive-api
crate provides a middle-level HTTP Client
to the
OneDrive API through Microsoft Graph, and also AuthClient
with utilities for authorization to it.
The onedrive_api::DriveClient
and onedrive_api::AuthClient
are synchronous by using reqwest::Client
. Async support is TODO.
Example
use onedrive_api::{DriveClient, FileName, DriveLocation, ItemLocation}; let client = DriveClient::new( "<...TOKEN...>".to_owned(), // Login token to Microsoft Graph. DriveLocation::me(), ); let folder_item = client.create_folder( ItemLocation::root(), FileName::new("test_folder").unwrap(), )?; client.upload_small( folder_item.id.as_ref().unwrap(), b"Hello, world", )?; Ok(())
Re-exports
pub use self::resource::DriveId; |
pub use self::resource::ItemId; |
pub use self::resource::Tag; |
Modules
option | Configurable options which can be used to customize behaviors or responses. |
resource | Resource Objects defined in the OneDrive API. |
Structs
AuthClient | The client for requests relative to authentication. |
CopyProgress | The progress of a asynchronous |
CopyProgressMonitor | The monitor for checking the progress of a asynchronous |
DriveClient | The authorized client to access OneDrive resources in a specified Drive. |
DriveLocation | Specify the location of a |
Error | The error may occur when processing requests. |
ExpectRange | A half-open byte range |
FileName | An valid file name str (unsized). |
ItemLocation | Reference to a |
ListChildrenFetcher | The page fetcher for children listing operation with |
Permission | A list of the Microsoft Graph permissions that you want the user to consent to. |
Token | Access tokens from AuthClient. |
TrackChangeFetcher | The page fetcher for tracking operations with |
UploadSession | An upload session for resumable file uploading process. |
Enums
ConflictBehavior | The conflict resolution behavior for actions that create a new item. |
CopyStatus | The status of a |
Type Definitions
Result | An alias to |