mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
chore(source): add source at latest version
This commit is contained in:
@@ -16,7 +16,7 @@ use hyper::http::h1::LINE_ENDING;
|
||||
use hyper::method::Method;
|
||||
use hyper::status::StatusCode;
|
||||
|
||||
use serde;
|
||||
use serde_json as json;
|
||||
|
||||
/// Identifies the Hub. There is only one per library, this trait is supposed
|
||||
/// to make intended use more explicit.
|
||||
@@ -188,7 +188,7 @@ pub trait Delegate {
|
||||
///
|
||||
/// * `json_encoded_value` - The json-encoded value which failed to decode.
|
||||
/// * `json_decode_error` - The decoder error
|
||||
fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) {
|
||||
fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &json::Error) {
|
||||
let _ = json_encoded_value;
|
||||
let _ = json_decode_error;
|
||||
}
|
||||
@@ -275,7 +275,7 @@ pub enum Error {
|
||||
|
||||
/// Shows that we failed to decode the server response.
|
||||
/// This can happen if the protocol changes in conjunction with strict json decoding.
|
||||
JsonDecodeError(String, serde::json::Error),
|
||||
JsonDecodeError(String, json::Error),
|
||||
|
||||
/// Indicates an HTTP repsonse with a non-success status code
|
||||
Failure(hyper::client::Response),
|
||||
@@ -718,8 +718,8 @@ impl<'a, A> ResumableUploadHelper<'a, A>
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
if let Retry::After(d) = self.delegate.http_failure(&res,
|
||||
serde::json::from_str(&json_err).ok(),
|
||||
serde::json::from_str(&json_err).ok()) {
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
sleep_ms(d.num_milliseconds() as u32);
|
||||
continue;
|
||||
}
|
||||
@@ -740,9 +740,9 @@ impl<'a, A> ResumableUploadHelper<'a, A>
|
||||
|
||||
// Copy of src/rust/cli/cmn.rs
|
||||
// TODO(ST): Allow sharing common code between program types
|
||||
pub fn remove_json_null_values(value: &mut serde::json::value::Value) {
|
||||
pub fn remove_json_null_values(value: &mut json::value::Value) {
|
||||
match *value {
|
||||
serde::json::value::Value::Object(ref mut map) => {
|
||||
json::value::Value::Object(ref mut map) => {
|
||||
let mut for_removal = Vec::new();
|
||||
|
||||
for (key, mut value) in map.iter_mut() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This file was generated automatically from 'src/mako/api/lib.rs.mako'
|
||||
// DO NOT EDIT !
|
||||
|
||||
//! This documentation was generated from *storage* crate version *0.1.8+20150326*, where *20150326* is the exact revision of the *storage:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.8*.
|
||||
//! This documentation was generated from *storage* crate version *0.1.9+20150710*, where *20150710* is the exact revision of the *storage:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.9*.
|
||||
//!
|
||||
//! Everything else about the *storage* *v1* API can be found at the
|
||||
//! [official documentation site](https://developers.google.com/storage/docs/json_api/).
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
extern crate hyper;
|
||||
extern crate serde;
|
||||
extern crate serde_json;
|
||||
extern crate yup_oauth2 as oauth2;
|
||||
extern crate mime;
|
||||
extern crate url;
|
||||
@@ -15,7 +16,7 @@ use std::cell::RefCell;
|
||||
use std::borrow::BorrowMut;
|
||||
use std::default::Default;
|
||||
use std::collections::BTreeMap;
|
||||
use serde::json;
|
||||
use serde_json as json;
|
||||
use std::io;
|
||||
use std::fs;
|
||||
use std::thread::sleep_ms;
|
||||
@@ -156,7 +157,7 @@ impl<'a, C, A> Storage<C, A>
|
||||
Storage {
|
||||
client: RefCell::new(client),
|
||||
auth: RefCell::new(authenticator),
|
||||
_user_agent: "google-api-rust-client/0.1.8".to_string(),
|
||||
_user_agent: "google-api-rust-client/0.1.9".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,7 +181,7 @@ impl<'a, C, A> Storage<C, A>
|
||||
}
|
||||
|
||||
/// Set the user-agent header field to use in all requests to the server.
|
||||
/// It defaults to `google-api-rust-client/0.1.8`.
|
||||
/// It defaults to `google-api-rust-client/0.1.9`.
|
||||
///
|
||||
/// Returns the previously set user-agent.
|
||||
pub fn user_agent(&mut self, agent_name: String) -> String {
|
||||
@@ -436,14 +437,14 @@ pub struct Object {
|
||||
pub kind: Option<String>,
|
||||
/// The name of this object. Required if not specified by URL parameter.
|
||||
pub name: Option<String>,
|
||||
/// MD5 hash of the data; encoded using base64.
|
||||
/// MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
|
||||
#[serde(rename="md5Hash")]
|
||||
pub md5_hash: Option<String>,
|
||||
/// The name of the bucket containing this object.
|
||||
pub bucket: Option<String>,
|
||||
/// Access controls on the object.
|
||||
pub acl: Option<Vec<ObjectAccessControl>>,
|
||||
/// CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order.
|
||||
/// CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
|
||||
pub crc32c: Option<String>,
|
||||
/// HTTP 1.1 Entity tag for the object.
|
||||
pub etag: Option<String>,
|
||||
|
||||
Reference in New Issue
Block a user