Commit Graph

27 Commits

Author SHA1 Message Date
Sebastian Thiel
bcc72e4fc1 Fields in Error related structs are now accessible
Fixes #239
2019-09-09 08:12:17 +02:00
Chris Pick
499416c011 fix(rust): teach remove_json_null_values arrays
change `remove_json_null_values()` to properly remove nulls from and recurse in to arrays
google_firestore1_beta1's `CommitRequest` contains an array of `Write` objects which can ultimately
contain `Value` members that need to have nulls removed to avoid sending multiple types of values
which generates a 400 response

fixes calls to google_firestore1_beta1's `hub.projects().databases_documents_commit()`
2019-07-03 18:27:27 +08:00
Greg Dallavalle
8f47126103 Fix typo Requst->Request 2017-01-12 12:33:33 -06:00
Sebastian Thiel
e7721ce53b chore(cleanup): remove workaround marker
... and some left-over comments.

The workaround code is actually more readable than the previous version,
so it may as well stay.

Fixes #109
2016-07-17 13:56:25 +02:00
Sebastian Thiel
065cfdd22f fix(lib): use hyper Bearer header style
Considering we kind-of hardcoded this authentication type anyway,
we now use the Auth-types provided by hyper 0.8.

The incentive here was the compiler telling us that there the
yup-oauth::Scheme type doesn't implement the hyper::authorization::Scheme
anymore, even though that clearly was the case. Also it couldn't be
reproduced in yup-oauth itself.

This will need some work to get correct again, so this is just a crude
patch to make it work again.
2016-04-10 13:01:18 +02:00
Sebastian Thiel
a2c6b58d5b fix(versionup): use latest oauth2 lib
It enables using std::time::Duration natively
2016-01-30 14:03:15 +01:00
Sebastian Thiel
b54acb7c96 fix(rustup): use std::Thread::sleep
However, in sibling libraries, we still use time::Duration, which
now is a part of std::time::Duration.
These should be adjusted, to make the usage of
sleep(Duration::from_millis(d.num_milliseconds() as u64)) into sleep(d)
2016-01-29 18:56:58 +01:00
Curtis McEnroe
61e74d99a2 Fix impl of hyper::net::NetworkStream 2015-11-29 17:55:35 -05:00
Sebastian Thiel
8ab4fd0bd4 fix(serde-up): update to serde 0.5.0
Serde move all json code into a separate crate that we are now using
as well.
2015-08-08 10:55:21 +02:00
Sebastian Thiel
d0491a4950 fix(hyper-up): work with hyper v0.6.0
Currently the latter actually fails to link on OSX, and requires a local
override with [this fix](https://goo.gl/OTExmN).
2015-06-26 15:49:30 +02:00
Sebastian Thiel
2ad8d887cd fix(api): minor fixes
* Mime crate must be used in the same version hyper uses
* made attempted move a borrow
2015-06-19 11:41:29 +02:00
Sebastian Thiel
5483e32832 fix(api): expanded header implementation
Now it compiles to the point where `Mime` appears as duplicate type,
for some reason.
2015-06-19 11:34:57 +02:00
Sebastian Thiel
b0a41c4e78 fix(api): first big step towards syntex
Even though there is a bug that caues {} to be used in stead of
(),
when exanding macros, which causes syntax errors that we have to
workaround, it's not a real issue.

What's happening additionally is missing hyper macros, which
now have to be expanded manually. Shouldn't be a problem,
pretty-printing when compiling is made for just that ;).

No, it's sad that `include!()` works so badly, it makes
using serde so difficult ... it's no fun i must say.

Just for stable ... I am not sure if it is worth it."
2015-06-18 22:51:17 +02:00
Sebastian Thiel
ee84fefb4a fix(rustup): deal with rustc lifetime issue
Related to #109
2015-05-11 10:56:36 +02:00
Sebastian Thiel
e86e55cae7 imp(API): improved display of BadRequest
Previously you would only see "BadRequest ... " without the information
that would actually help you to understand what the cause of the issue
is.
Now we will print all the information we have, accordingly, which
greatly improves usability.

Closes #103
[skip ci]
2015-05-09 19:15:16 +02:00
Sebastian Thiel
3fe2732a01 fix(compat): upgrade to hyper v0.4.0
It was basically just a find-and-replace to adapt to the changed names
of Error and Result types.
2015-05-08 11:52:28 +02:00
Sebastian Thiel
c346645fc9 fix(API): let delegate forget uploaded urls
When uploading using the resumable protocol, we are now telling the
delegate to forget the previously stored URL after successful upload.
Previously it would have tried to return such a URL and thus made
the system retry uploading a file that was already uploaded.

Fixes #85
[skip ci]
2015-05-01 16:24:31 +02:00
Sebastian Thiel
4115d50ca7 fix(API): adjust to latest hyper header macros 2015-04-30 11:15:48 +02:00
Sebastian Thiel
2f3b2d24ce fix(CLI): simple and resumable upload works
* fixed boundary syntax of multi-part message. Was --BOUNDARY, now is
  --BOUNDARY--
* Fixed ContentRange parsing and serialization. We actually managed
  to break it last time we tried to update it to match the Go
  implementation.
* fixed uploadType header parameter. It's based on chosen protocol and
  whether or not the method supports multipart operation for the given
  protocol.

Related to #76
2015-04-25 18:45:37 +02:00
Sebastian Thiel
a328942033 feat(API): improved error handling
We are now able to decode detailed errors and pass them on. This allows
the CLI to provide more useful error responses.
Additionally, the CLI will only print debug responses in --debug mode.

Fixes #82
2015-04-25 09:49:57 +02:00
Sebastian Thiel
e523ddb6ec fix(API): adapt to changed yup-oauth2 API
The latter changed a lot, to the better, and we handle the new
return types accordingly.

Related to #74
2015-04-23 17:07:28 +02:00
Sebastian Thiel
7dc9972445 feat(API): Display + Error traits for Error struct
* improved documentation about error handling, it's less verbose yet
  explains what you can do.

Fixes #56
2015-04-14 10:28:59 +02:00
Sebastian Thiel
be228f1994 feat(CLI): engine checks resource and method args
We are now at a spot where we can actually start parsing arguments.

* ArgumentError -> ClIError - seems more fitting

Fixes #55
2015-04-14 09:41:55 +02:00
Sebastian Thiel
b9a469c0a4 fix(cmn): use bytes=... when sending as well
Previously, `bytes=` was just parsed, but not sent to the server.
This change is motivated by a similar change in this commit:
http://goo.gl/AvyvLb
2015-04-11 09:31:23 +02:00
Sebastian Thiel
191e822c5a fix(hyper-client): adjust to hyper client
* deal with hyper client not using a type-parameter anymore
* fix incorrect documentation link (use '_' instead of '-')

Fixes #47
2015-04-08 16:51:46 +02:00
Sebastian Thiel
91861dcb71 fix(rustup): rustc (be9bd7c93 2015-04-05)
* using std::convert
* update to latest hyper (and other dependencies)

Related to #46
2015-04-07 11:59:10 +02:00
Sebastian Thiel
cefd606b53 feat(make): cli depends on API, generically
This allows us to build efficiently. CLI programs can now have their
own cmn.rs implementation, which we can test standalone with
`cargo test`.

The primary makefile currently just explicitly pulls in the type-*.yaml,
one day we could possibly put it into a loop.

Fixes #11
2015-03-24 12:56:24 +01:00