18个版本 (10个破坏性更新)
0.10.0 | 2024年3月23日 |
---|---|
0.9.0 | 2022年9月13日 |
0.8.1 | 2021年4月29日 |
0.7.0 | 2021年1月19日 |
0.1.0 | 2018年10月22日 |
#3 in #one-drive
每月401次 下载
在 3 crates 中使用
115KB
2K SLoC
onedrive-api
通过 OneDrive REST API 和 Microsoft Graph 的非官方中间层HTTP API绑定,并提供一些身份验证工具。
许可证
lib.rs
:
onedrive-api
onedrive-api
crate 提供中间层的HTTP API OneDrive
,用于通过 OneDrive API 和 Microsoft Graph,以及带有OAuth2工具的 Auth
。
示例
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?;
功能
-
beta
本crate中使用的多数Microsoft API都是稳定的。但也有一些beta API,可能会更改,不建议在生产应用程序中使用。Microsoft beta API的引用通常在标题后包含一个
(beta)
后缀。为了避免破坏,我们将beta API和相关资源放在功能门
beta
下。它们可能随时更改以遵循Microsoft API参考,并且 不遵循 本crate的语义版本。请谨慎使用,并且 不要在生产环境中使用。
依赖项
~4–15MB
~209K SLoC