Commit Graph

110 Commits

Author SHA1 Message Date
Sebastian Thiel
02a4129662 fix(clap): call iter() directly
As IntoIter is only implemented for slices up a sice of 32.
DFAReporting though will reach 55, at least.

Also added dfareporting-cli code to show how stackoverflow issues can be
circumvented efficiently.
2015-04-29 19:32:04 +02:00
Sebastian Thiel
9a8ae4b7d6 fix(clap): upload some code to help debugging
We get a stack-overflow when trying to run the dfa-reporting program,
and right now I don't know how to workaround it.

This could be preventing us from using clap.
2015-04-29 09:07:14 +02:00
Sebastian Thiel
c2dd9c7a02 fix(version-up): code updated to v0.1.6, latest CLI
* also includes publishing tag files
2015-04-26 13:42:31 +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
f8689be451 fix(all): update all code to latest version
* add new APIs
* remove old ones
* add latest json files
2015-04-24 20:07:12 +02:00
Sebastian Thiel
d8fdf9df9f fix(API): scopes were used illegally
Which caused a compile error. This was fixed by assuring the code
uses the same function to determine whether or not scopes are present
per method.

[skip ci]
2015-04-17 07:18:16 +02:00
Sebastian Thiel
9ea3fea775 fix(rustup): (abf0548b5 2015-04-15) (built 2015-04-15) 2015-04-17 06:46:43 +02:00
Sebastian Thiel
4cf0720ef1 fix(checkin): latest version of all APIs
Now CLI and API and the same level
2015-04-16 22:51:07 +02:00
Sebastian Thiel
f5f12c5594 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
2015-04-16 22:44:40 +02:00
Sebastian Thiel
3e0a24db0d fix(api-update): 'bytes ...' -> 'bytes=...'
* update all APIs to contain said change. It's not worth a republish
  though.
2015-04-12 08:56:48 +02:00
Sebastian Thiel
34d0a7aad3 fix(README): corrected absolute links
This only affected links in readme files, not the relative ones
in the actual documentation
2015-04-08 17:19:04 +02:00
Sebastian Thiel
a399488c27 fix(version-up): v0.1.5
* fix documentation link in Cargo.toml
* adjust to latest hyper. It's not even out yet, but people
  can't build the APIs anyway.
2015-04-08 16:54:50 +02:00
Sebastian Thiel
dd1d191966 fix(publish): v0.1.4
* macro 'alias' was renamed to 'rename'
* fixed `cargo test` on main project

The latter pointed me to the serde issue, which would have made
everything fail when actually used to communicate with google servers.
2015-04-07 15:53:30 +02:00
Sebastian Thiel
3403bd1c5c fix(publish): v0.1.3
* keywords are no longer than 20 characters, which is a restriction
  cargo imposes
* don't use 'homepage' link in cargo.toml unless the homepage is
  non-empty
* Added all publish-results to mark the respective crate version

Related to #46
2015-04-07 15:19:23 +02:00
Sebastian Thiel
99f8b65f75 fix(api-version-up): version 0.1.3
* builds with latest beta/nightly

Fixes #46
2015-04-07 12:05:48 +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
a2ca1cb28e fix(version-up): check-in of latest sources
This also includes crate files to remember which
crates we have published already.

Related to #44
2015-03-25 14:26:30 +01:00
Sebastian Thiel
d1c97912cb feat(mkdocs): mkdocs generator works now
It can be selected for each type of program we want to build, and makes
sense for everything that is not a library.

We also tried to unify names and folders a bit more, even though there
certainly is more work to be done to be fully non-redundant.

Fixes #43
2015-03-24 18:11:12 +01: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
Sebastian Thiel
be7d8214c1 feat(api): api generation works once again
With the new structure, it should be easy to add CLI programs with
proper dependencies accordingly.
2015-03-24 09:38:14 +01:00
Sebastian Thiel
04f4c95688 fix(mbuild): upload size now taken properly
Previously, it would query the size from the wrong dict and obtain
the value 0 all the time. This would have made every upload fail with
`UploadSizeLimitExeeded`.
Now we obtain the actual size limit, and will ignore it if unset/0
for some reason.

Patch += 1
2015-03-22 22:39:36 +01:00
Sebastian Thiel
3bc930ae47 fix(version-up): 0.1.0 release
* Added all APIs to source control
* upped crate version
2015-03-22 20:30:01 +01:00
Sebastian Thiel
cd1ff18ba9 fix(cmn): upload() return value handling
Now deals with Cancellation and non-OK status codes correctly.

Fixes #18
2015-03-22 20:21:21 +01:00
Sebastian Thiel
29ee94b4c0 feat(cmn): Resumable upload implemented
With all bells and whisles. For now, we don't have a good return value
to indicate that the operation was cancelled, which needs fixing.
2015-03-22 19:56:35 +01:00
Sebastian Thiel
065753cc3a feat(cmn): implement query_transfer_status()
The delegate logic is implemented and seems sound.
It's somewhat funny that after all this back and forth, all we get
is a valid start position for the upload.
2015-03-22 17:58:34 +01:00
Sebastian Thiel
556906ca60 fix(docs): re-export types used by delegate
Otherwise, delegate implementation might not actually be possible.
2015-03-22 13:28:28 +01:00
Sebastian Thiel
3a9aa51949 fix(docs):better introduction and version handling
Make it cristal clear what the crate version means, and what version of
the documentation you are looking at. Also do this in the README file.

Assure that 'Google' is capitalized.
2015-03-22 12:33:43 +01:00
Sebastian Thiel
d26cf77406 feat(mbuild): use of oauth2::Scheme
That way, we improved our API, reduced code bloat, and are very clear
about the what we do for Authorization.
2015-03-22 12:07:40 +01:00
Sebastian Thiel
030c40d269 fix(cargo): repository/source-code link
Previously it pointed to a timestamp file. Unified repository
source code link generation, and simplified 'deps.mako'.

Related to #38
2015-03-22 10:51:06 +01:00
Sebastian Thiel
8ad316bda3 feat(cargo): crate version +<revision>
That way, crate names reveal exact inforamtion about the contained
API revision.

* crate version: code gen version
* +<revision> (build-metadata): exact version of API schema

Fixes #38
2015-03-22 10:40:59 +01:00
Sebastian Thiel
9ea85273cd feat(mbuild): improved delegate calls
The delegate will be asked for an upload URL, that he may store during
yet another call.
2015-03-21 18:25:59 +01:00
Sebastian Thiel
4bf280079e fix(mbuild): simplification and cleanup
* renamed `*MethodsBuilder` type to `*Methods` type
* renamed `*CallBuilder` type to `*Call` type
* greatly simplified `doit()` signature if uploads are involved
* pass `auth` to upload helper
2015-03-21 16:27:41 +01:00
Sebastian Thiel
307d3f487c feat(mbuild): resumable-upload infrastructure
Layout the `ResumableUploadHelper` and implement the entire logic
with the mbuild renerator.

All that's left to be done is to implement the 'chunked upload' method.

The borrow checker helped me to prevent a bug as well.
2015-03-21 13:55:15 +01:00
Sebastian Thiel
80161f72be fix(types):prune unused and ToParts trait
* do not emit unused types. Sometimes though, rustc doesn't seem to
  detect that attributses are actually used
* ToParts trait is used and implemented only when needed.

Linters are back to 'normal'.

Fixes #35
2015-03-21 10:23:40 +01:00
Sebastian Thiel
9abf0eb64a chore(youtube): add latest version
* json takes delegate errors
2015-03-20 20:11:58 +01:00
Sebastian Thiel
10dfeeb1aa fix(name): MethodBuilder -> CallBuilder
Find-and-replace. It seems to build and work correctly, still
2015-03-20 18:20:50 +01:00
Sebastian Thiel
55978ff9a2 feat(json): Option<_> in schema only if needed
This means that only part fields will be optional.

Fixes #32
2015-03-20 16:43:13 +01:00
Sebastian Thiel
ff385e5cac fix(json): just add latest youtube code
It's good to see what actually changed in the json realm.
2015-03-20 14:49:56 +01:00
Sebastian Thiel
265b448297 feat(doit): simplify delegate calls
Now we use the DefaultDelegate as standin in case there is user-delgate.
That way, we save plenty of complexity as no additional
`if let Some(ref mut dlg) = delegate` is necesary.

Fixes #30
2015-03-19 19:26:19 +01:00
Sebastian Thiel
a05426e79b fix(doc-links): some links pointed to old doc name
With one of the recent changes, the crate name was changed to be
different from the library name. However, there were still plenty of
places that would refer to the library name instead of the new crate
name.

That way, links in the README.md as well as index/index.html still
pointed to the old location.
2015-03-19 14:40:59 +01:00
Sebastian Thiel
2f293f5e1b docs(ul/dl): method features and general info
* add method listing for various categories, like 'downloads' and
  'uploads'
* add general information on how to do downloads and uploads using
  various protocols

Fixes #28
2015-03-19 11:00:59 +01:00
Sebastian Thiel
02d7a06fdf feat(downloads): alt 'media' handling to allow dls
This also includes documentation to state which methods actually support
media download, and how to achieve that.

Added TODO to not forget we should tell the user how to achieve these
kinds of things.

Fixes #21
2015-03-19 09:31:29 +01:00
Sebastian Thiel
224af64068 feat(doit):optimized memory allocation and options
* reserve_exact(X) where possible (params, multi-part-reader)
* `if let` used whereever possible to prevent duplicate checks

This increases the possible performance, and makes for more readable,
concise code.
2015-03-18 22:03:52 +01:00
Sebastian Thiel
29d9e45c9f fix(doit): fix lifetime issues
Those were totally real, actually, and I am happy the borrow checker
exists !

Only one weirdness happened with RefCell<BorrowMut<C>>, but it could be
fixed by checking actual types using `let foo: () = something_nasty()`.
2015-03-18 15:05:01 +01:00
Sebastian Thiel
b0a1f518e9 feat(doit): more multipart infrastructure
* outer frame of `MultiPartReader` to allow using it in `doit()`
* restructured `doit()` to get content-types right

There is more work to do, as it currently doesn't compile, nor
do we deal with our streams correctly.

But we are on a good way.
2015-03-18 12:40:18 +01:00
Sebastian Thiel
7cfb5afd39 feat(doit): improve body infrastructure
This will support choosing custom readers at runtime, depending on
whether we have a resumable or simple media upload.
2015-03-18 08:50:22 +01:00
Sebastian Thiel
79879daf1b fix(methods): decent solution for free methods
Now I just add a 'virtual' resource, which is called 'methods'.
The good thing about this is that it works well standalone, or
in conjunction with actual resources.

Also the system works with it just with minimal changes

Fixes #19
2015-03-17 16:31:22 +01:00
Sebastian Thiel
60adacf8d4 feat(doit): pre-request delegate call.
This one is likely to change the further we advance in the upload-media
implementation.
2015-03-17 09:21:18 +01:00
Sebastian Thiel
eef1471357 feat(doit): json decode and delegation
Now json errors are handled and delegated with the option to retry,
and all other values are just decoded according to plan.

For now, I brutally unwrap json values assuming this will work, because
it really should work.
2015-03-16 17:14:04 +01:00
Sebastian Thiel
2c79f6e3cf feat(doit): authentication with and without scopes
It's quite rough around the edges, but has a slight chance to work.
Will still to handle return values accordingly.
2015-03-16 15:23:38 +01:00