Commit Graph

148 Commits

Author SHA1 Message Date
Sebastian Thiel
08d65ba62b chore(source): add source at latest version 2015-08-08 11:50:37 +02:00
Sebastian Thiel
e46535917c chore(code-update): upgrade to latest hyper+clap 2015-07-15 09:52:55 +02:00
Sebastian Thiel
7d58d66025 chore(json-update): update json and regen all code 2015-06-26 16:08:25 +02:00
Sebastian Thiel
3484fecf9c chore(code-update):added latest version of api+cli
APIs have additional files thanks to the build-script
requirement.
CLI has just seen minor changes though, making it
usable with a stable compiler.
2015-06-19 13:27:40 +02:00
Sebastian Thiel
9e6c9537a5 chore(code-up): latest version of all code 2015-05-10 12:07:12 +02:00
Sebastian Thiel
d2a4e2ff8b fix(CLI): added latest reference CLI code
Just to have something to link to
2015-05-02 10:22:55 +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
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
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
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
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
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
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
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
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
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
Sebastian Thiel
7f33cf22a5 feat(docs): add cargo.toml dependency information
Fixes #10
2015-03-15 11:37:19 +01:00
Sebastian Thiel
dd0772f1d7 feat(travis): docs and tests of youtube3 on travis
This might already bring it close to 7 minutes runtime, which seems
like providing us with a buffer big enough for when it is
feature-complete.
2015-03-14 11:52:59 +01:00
Sebastian Thiel
c0a2476058 feat(deps): update-json using discovery API
Instead of depending on the google go client API repository, I now
use the original data source, namely the discovery API.

fixes #5
2015-03-13 17:06:48 +01:00
Sebastian Thiel
4cf365d026 docs(todos): result handling and remaining todos
Basically there is no todo left, which puts us in a good position for
implementing more features, and get some feedback in the meanwhile.
2015-03-13 15:01:32 +01:00
Sebastian Thiel
9a17ab9e4e feat(docs): full usage example on landing page
Related to #4
2015-03-12 16:40:28 +01:00
Sebastian Thiel
7e243936f2 fix(traits): finally, we pick up all types
HashMap types were missing previously, but now it seems to be picked
up quite nicely.
Would this mean we do the type-setup correctly, everywhere ?
2015-03-11 21:21:11 +01:00
Sebastian Thiel
00de2b187d fix(traits): transitive, minimal traits for types
Previously, I would just assign all useful traits to all types, no
matter on how they were actually used.
Now it builds all dependnecies and considers them when assigning
traits, which is as precise as we need it.

This is important to us as the `Json` type is just encodable, but
not decodable. Fortunately, we just have to encode it, but in theory
this makes it hard to embed any json in a known structure.
2015-03-11 21:00:34 +01:00
Sebastian Thiel
712fed578a feat(json): part 1 to implement 'any' type
It is a Json object, with a schema as defined elsewhere. It's quite
cool to see this (nearly) working already. However, it will require
us to transitively assign the required markers which is based
on information we don't currently have.

Maybe implementing this could also help to simplify name-clash checks
or make them better at least ?
2015-03-11 17:07:07 +01:00
Sebastian Thiel
614539a925 fix(type-clashes): protect from nested-type-clash
It was possible for a nested type to be generated with a name that in
fact CLASHED with an existing schema type. What are the odds !

The clash-check added will just verify against clashes with schema
types, which seems to be doing it for now.
2015-03-11 15:30:11 +01:00