Commit Graph

554 Commits

Author SHA1 Message Date
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
76827ff665 refactor(mbuild+lib): remove map!, better dlg call
* map! wasn't used.
* improved delegate calls, using `match` or `delegate.is_some()` to
  get the nicest looking, shortest-possible code
2015-03-17 21:56:34 +01:00
Sebastian Thiel
b90a191688 fix(doit): repeated params string addition
It seems odd that String + &str is required.
In any way, previously it would try to add i32 to a string.
2015-03-17 19:59:04 +01:00
Sebastian Thiel
d2bf24ca85 feat(doit): simplify URL_ENCODE handling
More maintainable template code, with less redundancy.
2015-03-17 19:21:12 +01:00
Sebastian Thiel
1fee21de24 feat(doit): uri-template handling complete
We now handle url-encoding for the parameters that would require it,
and can deal with repeated params that will match '/param*'.
2015-03-17 19:12:44 +01:00
Sebastian Thiel
54eb784a55 feat(doit): uri-template generation works
This doesn't mean it's correctly implemented, but we are on our way.
It does compile, at least
2015-03-17 18:27:25 +01:00
Sebastian Thiel
863a98c0d7 fix(docs): repeated parameters docs improvement
Previously, it said it would 'set' the property, which is not the case
after all.
2015-03-17 17:34:33 +01:00
Sebastian Thiel
64219e7e7e feat(doit): repeated types in examples
Made sure usage examples know how to use repeated types.
2015-03-17 17:28:03 +01:00
Sebastian Thiel
d758f410f6 feat(doit): repeatable parameters working
The code dealing with them currently assumes they are "/" separated.
2015-03-17 17:16:27 +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
60d953a342 feat(methods): intermed. support for 'methods'
These 'methods' have no resources, and need slightly special handling.
This version at least makes the generator work, even though
it produces duplicates.

However, as it is so ugly, I'd rather consider to change it
substantially ... this feature should just come naturally.
2015-03-17 15:48:07 +01:00
Sebastian Thiel
354370705d feat(doit): partial implementation of url expr
URL expressions allow to substitute values within the URL with
parameters. However, this is not only a simple key-value replacement,
but supports expressions that need a parser.

This one will have to be implemented next.
2015-03-17 11:41:51 +01:00
Sebastian Thiel
33e85ddd29 feat(doit): set upload media type
Related to #17
2015-03-17 10:39:11 +01:00
Sebastian Thiel
91f69ffd6e fix(test): unit-tests work once again
Added missing Result cases to make match exhaustive
2015-03-17 09:30:20 +01:00
Sebastian Thiel
79cbf3ee3f feat(docs): add more obvious crate and api version
Fixes #16
2015-03-17 09:21:53 +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
1349c786b7 fix(doit): remove BorrowMut until it's cleared
See stackoverflow at http://goo.gl/f27zJkj.

Now we can actually call out client and move on with handling the result
2015-03-16 11:51:12 +01:00
Sebastian Thiel
9a58b0badd feat(doit): attempt to send json-encoded request
This doesn't work yet, as I am unable to unwrap the client properly.
It's a refcell that contains a BorrowMut to a hyper::Client, and
lets just, it's complicated.
2015-03-16 10:35:26 +01:00
Sebastian Thiel
814c9c9ffa fix(lib-name):user lower-case library names,always
fixes #14
2015-03-16 08:50:23 +01:00
Sebastian Thiel
31efbf4fb0 fix(travis): incorrectly capitalized cargo.toml
This caused cargo on a case-sensitive file-system not to find the
cargo file, which made it to look upwards in the directory structure
to find the correctly named Cargo.toml fo the 'cmn' development
project.
2015-03-15 11:51:24 +01:00
Sebastian Thiel
7f33cf22a5 feat(docs): add cargo.toml dependency information
Fixes #10
2015-03-15 11:37:19 +01:00
Sebastian Thiel
4c657ac9d1 fix(travis): explicit subshell for cargo-doc
Previously, it was only executing for cargo $(ARGS)
2015-03-14 13:29:01 +01:00
Sebastian Thiel
a87fbdf0a8 fix(travis): try using a subshell for cargo cmd
Apparently travis doesn't execute cargo in the right sub-directory.
Might be a difference in the way make works

Related to #8
2015-03-14 13:28:01 +01:00
Sebastian Thiel
51d05d6db0 fix(deps): fixed dependency to wrong target
Which caused the cmn.rs to be missing, and the build to fail.
2015-03-14 12:58:57 +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
8006bb8ca9 fix(activities): fully qualified activity names
Fixes #7
2015-03-14 11:23:01 +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
c8061ebe2f fix(#5): use function to make links correctly
It will automatically handle rust-doc mode, and use relative or absolute
links respectively.
2015-03-13 15:39:33 +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
4b9dbb28ff fix(to_version): assured it handles '0' correctly
Previously, it could possibly take a '0' away from the start of a
version. Now this is definitely not possible anymore.

Fixes #3
2015-03-12 11:40:09 +01:00
Sebastian Thiel
664d8225d2 feat(name): oauth22 -> oauth2_v2
Related to #3
2015-03-12 11:30:47 +01:00
Sebastian Thiel
97b2649094 fix(make): make 'regen-apis' work
Thanks to changes in mako libraries, it won't work anymore without
the template directory set
2015-03-12 11:21:58 +01:00
Sebastian Thiel
b8956103d9 feat(names): improved library names
Related to #3
2015-03-12 11:21:11 +01:00
Sebastian Thiel
206ccadbb3 docs(visuals): bigger font for doc-index 2015-03-12 10:27:36 +01:00
Sebastian Thiel
f27fda8f34 feat(gh-pages): new github-pages target
For import of all docs to the github

fixes #1
2015-03-12 10:02:22 +01:00
Sebastian Thiel
0bc6d216c3 chore(docs): generate doc index
It contains links to all generated API docs, in a style similar to the
standard rust API docs. Thank you, shared CSS !
2015-03-12 09:33:55 +01:00
Sebastian Thiel
7758f99ff2 fix(dev): typo 2015-03-11 22:59:18 +01:00
Sebastian Thiel
4f794ef5ff fix(types): fix incorrect nested type names
There was a name-duplication which led to un-inmplemented types.

The good thing is that this was the last issue that kept all 72
APIs from compiling.
2015-03-11 21:59: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
e3ab233a6c fix(schema): no unused types anymore
Due to shared global state which was altered, we got wrong results.
This is fixed now, thanks to a deepcopy. Amazing, how altering global
state is always biting you, even though you are convinced it's safe
to do in just this case !
General rule: Just don't do it, no matter what !
2015-03-11 18:47:37 +01:00
Sebastian Thiel
ac8c41530d feat(schemas): now we pre-generate nested schemas
Into a complete, global list of schemas, with additional meta-data.

However, it's currently not complete, as $refs are missing.
There is some resemblance to to_rust_type(...), which worries me
slightly
2015-03-11 18:01:53 +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
de40a8bd1e fix(typename): improved camelCasing
Previously, it was possible to get types like Foo_bar, which is not
desireable.
Now it is totally impossible to see such blasphemy ;)
2015-03-11 15:41:49 +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
Sebastian Thiel
32145e645e fix(names): nested type names are consistent now
At least so it appears.
The implementation doesn't look totally clean to me, as it seems
similar concerns are in different portions of the code, which was
merely tuned to work together.

It could break appart if someone - me - wants to change it sometime
2015-03-11 14:58:02 +01:00
Sebastian Thiel
538120f7d1 fix(mbuild): scope -> add_scope
This is not only more precisely saying what it does, but also doesn't
clash with scope parameters on resources ;) (happened in dfareporting)
2015-03-11 13:47:55 +01:00