Commit Graph

80 Commits

Author SHA1 Message Date
Sebastian Thiel
6fad7600a0 fix(mbuild): doit() call with enum type annotation
It's syntax I never used before, but ... works !
Now lets try to get the BorrowMut back
2015-03-08 15:55:41 +01:00
Sebastian Thiel
5b2d8a77a3 feat(mbuild): media-upload doit() methods
It's just a first step, and even though the generation works well,
I am still missing the right Rust code. Will have to simplify ...
2015-03-08 15:49:28 +01:00
Sebastian Thiel
de0c7a4ae0 feat(mbuild): param() to set any parameter
That way, things like drive.files.insert alt=media has a chance to work.
We should actually check for this to support various 'alt' values
2015-03-08 14:00:02 +01:00
Sebastian Thiel
0d9f6363eb fix(nestedtypes): recursion for nested types
Drive has recursive nested types, which were not handled preeviously.
2015-03-08 12:45:02 +01:00
Sebastian Thiel
66f3ae14e5 feat(drive): added gogole drive API
Just to have another, different set of api information to deal with,
and not accidentally hard-code things to work with youtube only.

Prepared dealing with media uploads, and it turns out to be best to
adjust the 'doit()' to take the respective type parameter.

We also have to think about downloads, like the ones for google drive,
which requires custom query parameters.
2015-03-08 11:38:06 +01:00
Sebastian Thiel
182d0c6fac docs(scopes): scope docs for method builders 2015-03-08 09:48:42 +01:00
Sebastian Thiel
020300af15 feat(type-params): ground work for upload media
This might mean we need additional type parameters, but I will see how
it's going to work out.

In theory, we could define a new trait for Seek+Read, but this would
mean that we couldn't contain owned streams.

For max flexibility, it's better to have additional type parameters
and use BorrowMut to allow ownership, and borrow.
2015-03-08 09:09:18 +01:00
Sebastian Thiel
a7f93a93b6 docs(visuals): fixed spacing
Also, the `do()` implementation was moved into it's own def, even
though it's still quite empty.
2015-03-06 17:15:25 +01:00
Sebastian Thiel
0ff1e07e53 docs(visuals): improved spacing 2015-03-05 17:57:45 +01:00
Sebastian Thiel
4bdee961d1 fix(markup): examples section in mbuilder got lost 2015-03-05 17:54:58 +01:00
Sebastian Thiel
fad0a7177a fix(docs): filter request value props by parts
Previously, it would just show all parts.
It's still not correct though as this isn't necessarily the parts used
in the request value, but only the ones in the response value.

It's as good as it gets though, that's all the information contained
in the json.
2015-03-05 17:47:35 +01:00
Sebastian Thiel
42ae75c1a1 docs(mbuild): added info about settable parts
It's not as good as the parts info on the website, but it's something !
At least people don't have to read the text, but find this information
in all the spots that are relevant to this.
2015-03-05 17:32:26 +01:00
Sebastian Thiel
a2550d1181 refactor(mbuild:usage): into own def
Was rather easy, and shows that plenty of complexity arose from the
usage example.

Implementing the action will probably be quite something ... .
Can't wait to have an auto-generated sample program !
2015-03-05 16:42:16 +01:00
Sebastian Thiel
4e8872b37a docs(mbuild): more information, nicer visuals 2015-03-05 16:28:23 +01:00
Sebastian Thiel
a3206abc92 fix(test): method builder examples work now
It was easier than expected, but in the end needs quite some custom
code and handling. Good to have mako (and python !!!)
2015-03-05 16:10:59 +01:00
Sebastian Thiel
9cbb2adc5a fix(docs): have to handle required/optionals vals
Of course, it's ok to do that, but ... of course it doesn't make things
easier. However, I want these examples to be representing the real thing
2015-03-05 16:03:05 +01:00
Sebastian Thiel
bfa20a18c8 docs(mbuild): method builder call example
With nearly fully randomized examples to show how it can be done.
It's quite nice to see actual calls, using everything required to get
a call. The only thing the user has to manage is to fill in actual
values.

But, it also shows that our builder pattern doesn't work yet due to ...
you guessed it ... lifetime issues :D
2015-03-05 15:42:37 +01:00
Sebastian Thiel
f2dda421e6 fix(docs): remove empty '/// # ' lines
They seem to make cargo fail to build valid doctests. Might be worth
a ticket !
2015-03-05 12:05:02 +01:00
Sebastian Thiel
331ecf87a7 refactor(rbuild): methods useful for mbuild as too
It's vital to be able to traverse parameters easily and consistently :)
2015-03-05 11:27:12 +01:00
Sebastian Thiel
70ea612f19 fix(builders): fixed part handling,it compiles now
What's missing is docs, which will see some work now.
I guess it will be best to hide all the prelude from the user, to allow
him to focus on what's important here.
2015-03-05 11:07:43 +01:00
Sebastian Thiel
48d40d45c5 feat(builders): request type handling part 1
Now we will generate proper resoure methods builder calls to instaniate
the more or less valid method builders.

However, it doesn't compile yet, and the 'to_parts()' method on
resources is still missing.
2015-03-05 08:27:07 +01:00
Sebastian Thiel
452b658c27 fix(mbuild): setters now copy copyables
Previously, they would take everything as reference and clone
everything unconditionally. Now we do it only as we need to do it,
no extra work incurred.
2015-03-04 21:13:04 +01:00
Sebastian Thiel
693b5c8f6a feat(rbuild): build insert/update ... methods
It's just the first version which defaults everything.
Required parameter lists still have to be built.

It's not going to be a problem at all.
2015-03-04 20:57:04 +01:00
Sebastian Thiel
1dc168497e refactor(mbuild): new _setter method
Just to make things a little easier to read. Don't expect it to
grow much larger though.
2015-03-04 20:29:58 +01:00
Sebastian Thiel
582aca3249 feat(setters): properties and setters for mbuilder
This includes descriptions, of course, and generally seems to look
quite neat. For now, we brutally consume all input to own it,
but in future we might be able to put in Borrow to support them all.
2015-03-04 19:18:04 +01:00
Sebastian Thiel
942cbe18f1 feat(mbuild): infrastructure for method builders
Now comes the actual work of setting them up.
Additionally, the docs were decluttered to show comments only
were necessary. Now the code path to getting the hub is as concise as
possible.
2015-03-04 17:16:50 +01:00
Sebastian Thiel
f1b99af5dc refactor(lib): move resource builder into own lib
As the code is likely to grow far more complex, it's required to move
it as long as it is easy to do so.
2015-03-04 16:05:50 +01:00
Sebastian Thiel
01db89057d feat(builder): Partial MethodBuilder impl
Including documentation at least on the method builder part. The
great thing is that fully working examples are now included on
every type !

Now more involved part starts ... namely setting up the individual call
method signatures.
2015-03-04 15:24:23 +01:00
Sebastian Thiel
8746f5e0e2 fix(visuals): using visual markers now
Makes everything evaluate faster, and is good enough as well.
Besides, you don't have to think about whitespace too much, keeping
things simpler is usually better
2015-03-04 12:24:55 +01:00
Sebastian Thiel
e96260bacc feat(visuals): defs are now more readable
This works with a new `indent` and `unindent` filters respectively.
There are a few things to consider, but I have understood how it works
and can handle it.
There is some overhead just to give me nicer visuals ... might choose
a different route, like annotations.
2015-03-04 12:03:31 +01:00
Sebastian Thiel
615a124654 feat(hub): generate hub implementation and docs
This includes docs for the library usage.
It's totally great to be able to paste example code right were it
belongs, and also put the same elsewhere to compose more complex docs.
2015-03-04 11:07:14 +01:00
Sebastian Thiel
85171ceb97 Merge branch 'schema' 2015-03-04 11:07:08 +01:00
Sebastian Thiel
74aa7bba2d docs(lib): library overview as far as possible
Everything we have, feature wise, is now documented in a first version
at least.

We shall keep this uptodate with what we are implementing, which also
helps figuring out a good api.
2015-03-03 12:53:38 +01:00
Sebastian Thiel
f1d95822f7 feat(doc): def for DO NOT EDIT comments
A note like that is now added to all files we generated, commented out
depending on the file type.

Quite neat, except that for filtering, I always have to use blocks.
2015-03-03 11:16:16 +01:00
Sebastian Thiel
e164cf7366 feat(docs): Traits now show up as part of lib
Previously, they were in an extra, oddly named crate.
Now we just make it a part of our generated codebase.

That way, traits, and common code, shows up as part of the library.
Fair enough.

This also means that the types ar not reusable.
Maybe a mixed-mode can be used if that is desired.
2015-03-03 10:02:40 +01:00
Sebastian Thiel
8dc5e2a53d fix(traits): perfected trait recognition.
However, they are not listed as traits of the youtube api. What we
really want is to list common implementation types as part of ourselves.

This doesn't work though as long as we don't have the common impl
as part of our sources.
2015-03-03 09:37:23 +01:00
Sebastian Thiel
c1eeee0591 feat(traits): add marker traits to schema types
Based on their involvement in activities.
It nearly works perfectly.
2015-03-03 09:25:42 +01:00
Sebastian Thiel
f4030f0284 fix(activities): now the map is complete
It's quite nice - next up is marker traits !
2015-03-03 08:26:29 +01:00
Sebastian Thiel
ba98bee62f feat(lookup): LUTs and context to make better docs
Now a context is passed to utility functions, which contains the state
these may be interested in. This keeps it clean from global state.

With the lookup tables, it is possible to figure out relations between
types and document them accordingly.
2015-03-03 08:06:37 +01:00
Sebastian Thiel
bb04b60dc4 fix(make): dependency handling:dirs with timestamp
That way, make will not regenerate unnecessarily
2015-03-03 06:46:47 +01:00
Sebastian Thiel
d8edf1dcd4 feat(youtube): first generated result ...
... just to keep track on how it changes over time.
2015-03-02 19:50:12 +01:00
Sebastian Thiel
ddb48a4303 fix(schema): make all pods optionals.
That way, json conversions will always work, which is probably what
we desire (especially when handling server answers).
2015-03-02 19:23:34 +01:00
Sebastian Thiel
49c2ffb8e0 fix(schema): now docs look good too 2015-03-02 19:18:06 +01:00
Sebastian Thiel
a5e675e7a9 feat(schema): generating valid rust from schemas
It's very nice, even though there is some more work to be done here.
It's just the beginning ... .
2015-03-02 19:07:58 +01:00
Sebastian Thiel
939e631edb Merge branch 'project-template' 2015-03-02 19:07:30 +01:00
Sebastian Thiel
475163ec29 feat(mako): now sets up entire project structure
That way, we have a common library to pull in from the main repository,
and a space for testing new code (in a partial implementation).

Next there will be generated object structures.
2015-03-02 16:50:22 +01:00
Sebastian Thiel
317554aff3 fix(mako): unify generated constants
like library-name. That way, they are always the same, even if I
change my mind.

Good coding style is easy, using the current setup.
2015-03-02 15:31:53 +01:00
Sebastian Thiel
fc15a7030f feat(license): improved license information
... and readme, and looks of author listing.
Slowly getting into the flow, possibilities seem thrilling.
2015-03-02 15:23:41 +01:00
Sebastian Thiel
3670e4f6c9 feat(mako): LICENSE + README.md
Readme is very initial, but the architecture is set to evolve it to
something no less than beatiful.
2015-03-02 14:58:18 +01:00
Sebastian Thiel
4e5f2c05d9 feat(mako): mako-render generates output dirs
That way, the makefile doesn't need to know that much anymore, and
gets simpler/less verbose.

\# Also
* Added filters for rust doc string
* fixed .PHONY
2015-03-02 13:45:57 +01:00