18 releases (10 breaking)
0.10.0 | Mar 23, 2024 |
---|---|
0.9.0 | Sep 13, 2022 |
0.8.1 | Apr 29, 2021 |
0.7.0 | Jan 19, 2021 |
0.1.0 | Oct 22, 2018 |
#1365 in Web programming
127 downloads per month
Used in 3 crates
115KB
2K
SLoC
onedrive-api
A non-official middle-level HTTP API bindings to the OneDrive REST API through Microsoft Graph, and also some utilities for authentication,
License
lib.rs
:
onedrive-api
onedrive-api
crate provides middle-level HTTP APIs OneDrive
to the
OneDrive API through Microsoft Graph, and also Auth
with utilities for OAuth2.
Example
use onedrive_api::{OneDrive, FileName, DriveLocation, ItemLocation};
use reqwest::Client;
let client = Client::new();
let drive = OneDrive::new(
"<...TOKEN...>", // Login token to Microsoft Graph.
DriveLocation::me(),
);
let folder_item = drive
.create_folder(
ItemLocation::root(),
FileName::new("test_folder").unwrap(),
)
.await?;
drive
.upload_small(
folder_item.id.as_ref().unwrap(),
&b"Hello, world"[..],
)
.await?;
Features
-
beta
Most of Microsoft APIs used in this crate are stable. But there are also some beta APIs, which are subject to change and is not suggested to be used in production application. Microsoft references of beta APIs usually contain a
(beta)
suffix in title.To avoid breakage, we put beta APIs and related resources under feature gate
beta
. They may change to follow Microsoft API references ANYTIME, and do NOT follow the semantic version of this crate.Be carefully using it and do NOT use it in production.
Dependencies
~4–15MB
~195K SLoC