dropbox-sdk 0.20.0

Rust bindings to the Dropbox API, generated by Stone from the official spec.
Documentation
// DO NOT EDIT
// This file was @generated by Stone

#![allow(
    clippy::too_many_arguments,
    clippy::large_enum_variant,
    clippy::result_large_err,
    clippy::doc_markdown,
    clippy::doc_lazy_continuation,
)]

#[allow(unused_imports)]
pub use crate::generated::types::account::*;

/// This lovely endpoint gets the account photo of a given user.
pub fn get_photo(
    client: &impl crate::client_trait::UserAuthClient,
    arg: &AccountPhotoGetArg,
    range_start: Option<u64>,
    range_end: Option<u64>,
) -> Result<crate::client_trait::HttpRequestResult<AccountPhotoGetResult>, crate::Error<AccountPhotoGetError>> {
    crate::client_helpers::unwrap_async_body(
        crate::client_helpers::request_with_body(
            client,
            crate::client_trait_common::Endpoint::Content,
            crate::client_trait_common::Style::Download,
            "account/get_photo",
            arg,
            None,
            range_start,
            range_end),
        client,
    )
}

/// Sets a user's profile photo.
pub fn set_profile_photo(
    client: &impl crate::client_trait::UserAuthClient,
    arg: &SetProfilePhotoArg,
) -> Result<SetProfilePhotoResult, crate::Error<SetProfilePhotoError>> {
    crate::client_helpers::unwrap_async(
        crate::client_helpers::request(
            client,
            crate::client_trait_common::Endpoint::Api,
            crate::client_trait_common::Style::Rpc,
            "account/set_profile_photo",
            arg,
            None)
    )
}