[−][src]Module onedrive_api::resource
Resource Objects defined in the OneDrive API.
Field descriptors
Resource object struct
s have field descriper enum
s representing
all controlable fields of it, which may be used
in onedrive_api::option
to select
or expand
it using
with_option
version API of OneDrive
.
Example
Here is an example to use resource::DriveItemField
.
use onedrive_api::{OneDrive, ItemLocation, option::ObjectOption}; use onedrive_api::resource::*; // let drive: OneDrive; let item: Option<DriveItem> = drive .get_item_with_option( ItemLocation::root(), ObjectOption::new() .if_none_match(&Tag("<abcdABCD1234>".to_owned())) // Only response `id` and `e_tag` to reduce data transmission. .select(&[DriveItemField::id, DriveItemField::e_tag]), ) .await?; match item { None => println!("Tag matched"), Some(item) => { println!("id: {:?}, e_tag: {:?}", item.id.unwrap(), item.e_tag.unwrap()); } }
See also
Structs
Drive | Drive resource type |
DriveId | Wrapper for a unique identifier to a |
DriveItem | DriveItem resource type |
ErrorResponse | The error resource type, returned whenever an error occurs in the processing of a request. |
ItemId | Wrapper for a unique identifier for a |
OAuth2ErrorResponse | OAuth2 error response. |
Tag | Wrapper for a tag representing the state of an item. |
Enums
DriveField | Fields descriptors. |
DriveItemField | Fields descriptors. |
Type Definitions
JsonValue | Boxed raw json value. |
TimestampString | Timestamp string with ISO 8601 format. |
Url | A semantic alias for URL string in resource objects. |