feat(CLI): added first versions of all CLI

That way, changes can be tracked.
Also, we make it official.

Future checkins will only be made if major changes were done,
similar to how the APIs are handled.

Related to #64
This commit is contained in:
Sebastian Thiel
2015-04-16 22:44:40 +02:00
parent fa278a99c7
commit f5f12c5594
476 changed files with 190441 additions and 1038 deletions

View File

@@ -103,16 +103,18 @@
//!
//! match result {
//! Err(e) => match e {
//! Error::HttpError(err) => println!("HTTPERROR: {:?}", err),
//! Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"),
//! Error::MissingToken => println!("OAuth2: Missing Token"),
//! Error::Cancelled => println!("Operation canceled by user"),
//! Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size),
//! Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"),
//! Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field),
//! Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err),
//! // The Error enum provides details about what exactly happened.
//! // You can also just use its `Debug`, `Display` or `Error` traits
//! Error::HttpError(_)
//! |Error::MissingAPIKey
//! |Error::MissingToken
//! |Error::Cancelled
//! |Error::UploadSizeLimitExceeded(_, _)
//! |Error::Failure(_)
//! |Error::FieldClash(_)
//! |Error::JsonDecodeError(_) => println!("{}", e),
//! },
//! Ok(_) => println!("Success (value doesn't print)"),
//! Ok(res) => println!("Success: {:?}", res),
//! }
//! # }
//! ```
@@ -271,16 +273,18 @@ impl Default for Scope {
///
/// match result {
/// Err(e) => match e {
/// Error::HttpError(err) => println!("HTTPERROR: {:?}", err),
/// Error::MissingAPIKey => println!("Auth: Missing API Key - used if there are no scopes"),
/// Error::MissingToken => println!("OAuth2: Missing Token"),
/// Error::Cancelled => println!("Operation canceled by user"),
/// Error::UploadSizeLimitExceeded(size, max_size) => println!("Upload size too big: {} of {}", size, max_size),
/// Error::Failure(_) => println!("General Failure (hyper::client::Response doesn't print)"),
/// Error::FieldClash(clashed_field) => println!("You added custom parameter which is part of builder: {:?}", clashed_field),
/// Error::JsonDecodeError(err) => println!("Couldn't understand server reply - maybe API needs update: {:?}", err),
/// // The Error enum provides details about what exactly happened.
/// // You can also just use its `Debug`, `Display` or `Error` traits
/// Error::HttpError(_)
/// |Error::MissingAPIKey
/// |Error::MissingToken
/// |Error::Cancelled
/// |Error::UploadSizeLimitExceeded(_, _)
/// |Error::Failure(_)
/// |Error::FieldClash(_)
/// |Error::JsonDecodeError(_) => println!("{}", e),
/// },
/// Ok(_) => println!("Success (value doesn't print)"),
/// Ok(res) => println!("Success: {:?}", res),
/// }
/// # }
/// ```
@@ -331,7 +335,7 @@ impl<'a, C, A> GroupsMigration<C, A>
///
/// * [insert archive](struct.ArchiveInsertCall.html) (response)
///
#[derive(Default, Clone, Debug, Deserialize)]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Groups {
/// The kind of insert resource this is.
pub kind: String,
@@ -690,23 +694,22 @@ impl<'a, C, A> ArchiveInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
self.doit(resumeable_stream, mime_type, "resumable")
}
/// The group ID
///
/// Sets the *group id* path property to the given value.
///
/// Even though the property as already been set when instantiating this call,
/// we provide this method for API completeness.
///
/// The group ID
pub fn group_id(mut self, new_value: &str) -> ArchiveInsertCall<'a, C, A> {
self._group_id = new_value.to_string();
self
}
/// Sets the *delegate* property to the given value.
///
///
/// The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong
/// while executing the actual API request.
///
/// It should be used to handle progress information, and to implement a certain level of resilience.
///
/// Sets the *delegate* property to the given value.
pub fn delegate(mut self, new_value: &'a mut Delegate) -> ArchiveInsertCall<'a, C, A> {
self._delegate = Some(new_value);
self
@@ -736,8 +739,8 @@ impl<'a, C, A> ArchiveInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
/// Identifies the authorization scope for the method you are building.
///
/// Use this method to actively specify which scope should be used, instead of relying on the
/// automated algorithm which simply prefers read-only scopes over those who are not.
/// Use this method to actively specify which scope should be used, instead the default `Scope` variant
/// `Scope::AppGroupMigration`.
///
/// The `scope` will be added to a set of scopes. This is important as one can maintain access
/// tokens for more than one scope.