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

Download history 63/week @ 2024-07-22 25/week @ 2024-07-29 159/week @ 2024-08-05 34/week @ 2024-08-12 32/week @ 2024-08-19 114/week @ 2024-08-26 89/week @ 2024-09-02 18/week @ 2024-09-09 40/week @ 2024-09-16 142/week @ 2024-09-23 90/week @ 2024-09-30 53/week @ 2024-10-07 32/week @ 2024-10-14 45/week @ 2024-10-21 6/week @ 2024-10-28 36/week @ 2024-11-04

127 downloads per month
Used in 3 crates

MIT license

115KB
2K SLoC

onedrive-api

Build Status crates.io Documentation

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