[−][src]Module onedrive_api::resource
Resource Objects defined in the OneDrive API.
Field descriper
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 DriveClient
.
Example
Here is an example to use resource::DriveItemField
.
use onedrive_api::{DriveClient, ItemLocation, option::ObjectOption}; use onedrive_api::resource::*; // let client: DriveClient; let item: Option<DriveItem> = client .get_item_with_option( ItemLocation::root(), ObjectOption::new() .if_none_match(&Tag::new("<abcd ... 1234>".to_owned())) // Only response `id` and `e_tag` to reduce data transmission. .select(&[DriveItemField::id, DriveItemField::e_tag]), )?; // `item` is `None` if it matches the tag. Ok(())
See also
Structs
Drive | Drive resource type |
DriveId | The unique identifier to a |
DriveItem | DriveItem resource type |
ErrorObject | The error object with description and details of the error responsed from server. |
ItemId | The unique identifier for a |
Tag | An 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. |