mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
Make yup-oauth2 optional
This commit is contained in:
@@ -58,6 +58,8 @@ path = "../${api_name}"
|
||||
version = "${util.crate_version()}"
|
||||
% endif
|
||||
|
||||
## TODO: Make yup-oauth2 optional
|
||||
# [features]
|
||||
# default = ["yup-oauth2"]
|
||||
% if not cargo.get("is_executable", False):
|
||||
[features]
|
||||
yup-oauth2 = ["google-apis-common/yup-oauth2"]
|
||||
default = ["yup-oauth2"]
|
||||
% endif
|
||||
@@ -31,7 +31,7 @@ use tokio::time::sleep;
|
||||
use tower_service;
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
use crate::{client, client::GetToken, client::oauth2, client::serde_with};
|
||||
use crate::{client, client::GetToken, client::serde_with};
|
||||
|
||||
// ##############
|
||||
// UTILITIES ###
|
||||
|
||||
@@ -49,5 +49,8 @@ pub mod api;
|
||||
|
||||
// Re-export the hub type and some basic client structs
|
||||
pub use api::${hub_type};
|
||||
pub use client::{Result, Error, Delegate, FieldMask};
|
||||
|
||||
// Re-export the yup_oauth2 crate, that is required to call some methods of the hub and the client
|
||||
pub use client::{Result, Error, Delegate, oauth2, FieldMask};
|
||||
#[cfg(feature = "yup-oauth2")]
|
||||
pub use client::oauth2;
|
||||
Reference in New Issue
Block a user