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

#1402 in Web programming

Download history 41/week @ 2024-08-16 91/week @ 2024-08-23 85/week @ 2024-08-30 47/week @ 2024-09-06 30/week @ 2024-09-13 79/week @ 2024-09-20 141/week @ 2024-09-27 63/week @ 2024-10-04 37/week @ 2024-10-11 57/week @ 2024-10-18 6/week @ 2024-10-25 25/week @ 2024-11-01 19/week @ 2024-11-08 10/week @ 2024-11-15 15/week @ 2024-11-22 10/week @ 2024-11-29

60 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
~194K SLoC