Commit Graph

83 Commits

Author SHA1 Message Date
Sebastian Thiel
b88e1633ed Fix rust compile warnings 2021-01-06 22:45:28 +08:00
Sebastian Thiel
60e50da476 Merge branch 'master' into namespaced-items 2021-01-06 21:54:15 +08:00
Sebastian Thiel
f7aba5114e everything runs through now, only ordering missing 2021-01-06 17:10:36 +08:00
Sebastian Thiel
043f3752e6 basic python 3 port, nearly works 2021-01-05 23:24:57 +08:00
Petros Angelatos
87c9c10ce1 remove unused import that was causing a clash
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2020-12-19 19:42:38 +01:00
Petros Angelatos
684d54d445 handle cases where part is a repeated property
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2020-12-19 10:01:58 +01:00
Petros Angelatos
af73936b95 rename cmn to client
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2020-12-19 00:46:06 +01:00
Petros Angelatos
0e69ffc9eb cleanup top-level namespace and organize items under cmn and api
the top level module re-exports a few very common items like the hub
struct of the particular API and Result, Error, and Delegate.

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2020-12-19 00:44:20 +01:00
Petros Angelatos
b5923b277c use direct references to types to generate documentation
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2020-12-19 00:44:20 +01:00
Petros Angelatos
38b1ed145c use fully qualified names to access items from cmn
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2020-12-19 00:44:15 +01:00
Sebastian Thiel
5e5327f3f7 Use api overrides to specialize building of drive2/3 APIs
This seems preferable over hardcoding special knowledge into the
generator code.
2020-06-05 11:11:17 +08:00
Dennis Vestergaard Værum
041f8951e3 Added the doit_without_upload function to the code generator 2020-06-03 00:33:21 +02:00
Björn Weinehall
6ed8df5f96 Extend attempted error message parsing to also cover ErrorResponse
objects. Fixes errors in e.g. drive3 api not getting passed to delegate
error handlers.
2020-05-29 19:43:50 +08:00
Sebastian Thiel
8e9ce08aa2 Fix typo: enocodable -> encodable
Fixes #250
2020-04-14 08:51:19 +08:00
Sebastian Thiel
65b8f0063d Rewrite deprecated features, such as try!
As taken from
https://github.com/Byron/google-apis-rs/pull/247
2020-01-18 14:46:53 +08:00
Sebastian Thiel
f33fae47e9 Add Rust preprocessor to handle code examples gracefully
Fixes #213
2019-07-05 17:00:56 +08:00
Sebastian Thiel
7a44b3eae1 Unconditionally re-export everything in cmn.rs
Related to #218
2019-07-05 10:17:03 +08:00
gheoan
43b953445e docs(mako): fix typo 2018-12-21 13:00:04 +01:00
Guy Taylor
a793af5586 Make utils.method_params private as it is not used.
This removed it been improted into Mako templates and renames it
_method_params to make it clear.
2018-10-28 11:39:29 +01:00
Sebastian Thiel
0360e61c27 Merge branch 'update_url_to_1_7_1' of https://github.com/edelangh/google-apis-rs into edelangh-update_url_to_1_7_1 2018-10-21 12:08:26 +02:00
edelangh
0403e19476 Update dep url to 1.7.1 2018-10-16 23:52:34 +02:00
Sebastian Thiel
255c7f5ad5 Update to latest versions of API declarations 2018-10-13 13:49:14 +02:00
Bryan Burgers
7a041ecf2d docs(LIB): Add dependencies to README
In the section that describes setting up the Cargo.toml, add the
required dependencies, and note that `hyper` and `hyper-rustls` are not
the latest versions. This helps new users get started quicker and
easier.
2018-10-13 11:47:34 +02:00
Cristi Cobzarenco
f835835100 fix(mbuild): strip leading slashes from urls 2017-08-27 09:57:50 +02:00
Sebastian Thiel
a630af5830 First step towards allowing scopes to be deactivated entirely
This is backwards compatible, but allows `add_scope(None)` as well.
Maybe it's better to just add another function, but on the other hand,
this would already do and solves that somewhat more special case.

Related to #172
2017-06-28 09:15:57 +02:00
Sebastian Thiel
4660d23676 fix(docs): Example now uses hyper_rustls
It's already done by the CLI, but the docs still showed
code that would only work in older hyper versions that still
shipped with HTTPS.

Fixes #169
2017-05-26 10:14:39 +02:00
Sebastian Thiel
dd4bfe3de0 fix(lib): more idiomatic swapping of values 2017-05-22 20:57:24 +02:00
Christian Legnitto
9ffa241f37 feat(hub): Allow overriding rootUrl and baseUrl
Allow the hub to override `rootUrl` and `baseUrl` for the service.
This is useful for pointing at localhost for testing or a proxy.
2017-05-06 17:59:05 -07:00
Sebastian Thiel
0337435cd4 imp(serde): upgrade to v0.9
This provides proc macros, greatly simplifying the build
projects.
2017-02-03 08:23:00 +01:00
Sebastian Thiel
cc30a2e20b doc(index): don't use relative links
Instead we link to the absolute location.

tech debt: we now use http://byron.github.io/google-apis-rs
multiple times and thus duplicate that information.
2016-12-24 15:16:59 +01:00
Sebastian Thiel
fc34337ee4 doc(lib): use docs.rs for library documentation
We will still need to host the CLI docs though.
2016-12-24 10:35:48 +01:00
Sebastian Thiel
f3d0ef45d2 fix(license): correct link to license on github
[skip ci]
2016-12-17 17:07:56 +01:00
Sebastian Thiel
73f0e83086 chore(deps): use serde_derive 2016-10-09 15:58:11 +02:00
Sebastian Thiel
b21d96177d Merge pull request #155 from dermesser/parse-empty-correctly
fix(api types): Add an unused field to empty API types.
2016-09-25 19:36:48 +02:00
Lewin Bormann
0f14aa966e fix(api types): Add an unused field to empty API types.
Null structs (struct Foo;) cause the following error when trying to
deserialize an empty JSON object `{}` into them:

`JsonDecodeError("{}\n", Syntax(InvalidType(Map), 1, 1))` (also known as
`invalid type: map at line 1 column 1: {}`). The optional struct member
prevents this error.
2016-09-21 21:52:44 +02:00
Lewin Bormann
292dd2f34f fix(template): URL-encoding '/' in URLs is not accepted by Google APIs. 2016-09-21 09:49:01 +02:00
Sebastian Thiel
3921b6a5a0 fix(dependencies): use working version of serde-codegen
This update fixes the build on stable, and allows builds
on nightly as usual.

The trick is to use the latest version of serde-codegen,
which keeps the syntex version internal, preventing clashes
between libraries that might have different requirements.
2016-07-17 12:05:14 +02:00
Sebastian Thiel
320d769c6f chore(nightly): Travis CI support
Travis should now be able to use nightly as well.
2016-05-20 15:53:49 +02:00
Sebastian Thiel
8d7a49891f chore(dependencies): update to latest version + nightly support
Nightly is now supported, in theory, to allow not to use serde_codegen,
which currently has trouble to build thanks to an assertion error.

Nightly on the other hand suffers from being build with incorrect
feature-flags, which makes quasi_macros fail to build ... .
2016-05-20 15:06:19 +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
Curtis McEnroe
3e1c4428ef Send repeated properties as repeated query parameters 2016-02-07 14:30:29 -05: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
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
e129a7d3ae fix(hyper-up): compatibility with hyper 0.6.4
* Signature of `client::Response` changed and now requires a
  `hyper::Url` as well.

 Closes #123
2015-07-15 09:50:00 +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
2cc4807234 fix(API): URL substitution handling
Previously we would remove the wrong parameters when attempting to
remove only those parameters that have been used in the URL
substitution.

The code we have now is more idiomatic and appears to be removing the
correct parameters.

Closes #114
[skip ci]
2015-05-13 10:11:20 +02:00
Sebastian Thiel
a2dd71451d feat(config): basis for simplified value setting
Previously we would set static structures manully, using complex cases
and utility functions. Now we setup the foundation to allow setting
a generic `json::value::Value` instead, which can later be deserialized
into the target structure.

Related to #111
2015-05-12 11:17:42 +02:00
Sebastian Thiel
15daf311ea refactor(API): use json_tools::IteratorExt
That way, we can invert the flow and produce more idiomatic code.
[skip ci]
2015-05-09 09:57:26 +02:00