Skip to content

Commit

Permalink
Merge branch 'clap'
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Apr 30, 2015
2 parents 57808cf + d0ce221 commit a2547b3
Show file tree
Hide file tree
Showing 27 changed files with 8,371 additions and 33,998 deletions.
5 changes: 2 additions & 3 deletions etc/api/type-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ make:
- source: main.rs
output_dir: src
cargo:
build_version: "0.1.0"
build_version: "0.2.0"
keywords: [cli]
is_executable: YES
dependencies:
- docopt = "*"
- docopt_macros = "*"
- clap = "*"
- rustc-serialize = "*"
- yup-hyper-mock = "*"
- serde = ">= 0.3.0"
Expand Down
5 changes: 2 additions & 3 deletions gen/dfareporting2d1-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[package]

name = "google-dfareporting2d1-cli"
version = "0.1.0+20150326"
version = "0.2.0+20150326"
authors = ["Sebastian Thiel <[email protected]>"]
description = "A complete library to interact with dfareporting (protocol v2.1)"
repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d1-cli"
Expand All @@ -20,8 +20,7 @@ name = "dfareporting2d1"
hyper = "*"
mime = "*"
yup-oauth2 = "*"
docopt = "*"
docopt_macros = "*"
clap = "*"
rustc-serialize = "*"
yup-hyper-mock = "*"
serde = ">= 0.3.0"
Expand Down
7 changes: 5 additions & 2 deletions gen/dfareporting2d1-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ capabilities. Errors will be printed to standard error, and cause the program's

If data-structures are requested, these will be returned as pretty-printed JSON, to be useful as input to other tools.

Everything else about the *dfareporting* API can be found at the
[official documentation site](https://developers.google.com/doubleclick-advertisers/reporting/).

# Usage

This documentation was generated from the *dfareporting* API at revision *20150326*. The CLI is at version *0.1.0*.
This documentation was generated from the *dfareporting* API at revision *20150326*. The CLI is at version *0.2.0*.

```bash
dfareporting2d1 [options] account-active-ad-summaries get <profile-id> <summary-account-id> [-p <v>...] [-o <out>]
Expand Down Expand Up @@ -211,7 +214,7 @@ This documentation was generated from the *dfareporting* API at revision *201503
dfareporting2d1 --help

All documentation details can be found at
http://byron.github.io/google-apis-rs/google_dfareporting2d1_cli/index.html
http://byron.github.io/google-apis-rs/google_dfareporting2d1_cli

Configuration:
--scope <url>
Expand Down
2 changes: 1 addition & 1 deletion gen/dfareporting2d1-cli/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
site_name: dfareporting v0.1.0+20150326
site_name: dfareporting v0.2.0+20150326
site_url: http://byron.github.io/google-apis-rs/google-dfareporting2d1-cli
site_description: Write integrating applications with bcore

Expand Down
17 changes: 17 additions & 0 deletions gen/dfareporting2d1-cli/src/cmn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use oauth2::{ApplicationSecret, ConsoleApplicationSecret, TokenStorage, Token};
use rustc_serialize::json;
use mime::Mime;
use clap::{App, SubCommand};

use std::fs;
use std::env;
Expand All @@ -17,6 +18,22 @@ use std::default::Default;

const FIELD_SEP: char = '.';

/// Unused for now, can be used once https://github.com/kbknapp/clap-rs/issues/87
/// is available
pub enum UploadProtocol {
Simple,
Resumable,
}

impl AsRef<str> for UploadProtocol {
fn as_ref(&self) -> &str {
match *self {
UploadProtocol::Simple => "simple",
UploadProtocol::Resumable => "resumable",
}
}
}

#[derive(Clone, Default)]
pub struct FieldCursor(Vec<String>);

Expand Down
29,419 changes: 5,945 additions & 23,474 deletions gen/dfareporting2d1-cli/src/main.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gen/dfareporting2d1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ These will always take a single argument, for which the following statements are

* [PODs][wiki-pod] are handed by copy
* strings are passed as `&str`
* [request values](http://byron.github.io/google-apis-rs/google_dfareporting2d1/trait.RequestValue.html) are borrowed
* [request values](http://byron.github.io/google-apis-rs/google_dfareporting2d1/trait.RequestValue.html) are moved

Arguments will always be copied or cloned into the builder, to make them independent of their original life times.

Expand Down
388 changes: 194 additions & 194 deletions gen/dfareporting2d1/src/lib.rs

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions gen/discovery1-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[package]

name = "google-discovery1-cli"
version = "0.1.0+00000000"
version = "0.2.0+00000000"
authors = ["Sebastian Thiel <[email protected]>"]
description = "A complete library to interact with discovery (protocol v1)"
repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/discovery1-cli"
Expand All @@ -20,8 +20,7 @@ name = "discovery1"
hyper = "*"
mime = "*"
yup-oauth2 = "*"
docopt = "*"
docopt_macros = "*"
clap = "*"
rustc-serialize = "*"
yup-hyper-mock = "*"
serde = ">= 0.3.0"
Expand Down
5 changes: 4 additions & 1 deletion gen/discovery1-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ capabilities. Errors will be printed to standard error, and cause the program's

If data-structures are requested, these will be returned as pretty-printed JSON, to be useful as input to other tools.

Everything else about the *discovery* API can be found at the
[official documentation site](https://developers.google.com/discovery/).

# Usage

This documentation was generated from the *discovery* API at revision *00000000*. The CLI is at version *0.1.0*.
This documentation was generated from the *discovery* API at revision *00000000*. The CLI is at version *0.2.0*.

```bash
discovery1 [options] apis get-rest <api> <version> [-p <v>...] [-o <out>]
Expand Down
2 changes: 1 addition & 1 deletion gen/discovery1-cli/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
site_name: discovery v0.1.0+00000000
site_name: discovery v0.2.0+00000000
site_url: http://byron.github.io/google-apis-rs/google-discovery1-cli
site_description: Write integrating applications with bcore

Expand Down
Loading

0 comments on commit a2547b3

Please sign in to comment.