It seems nearly nothing can be taken for granted ;).
It's best to just run against a big set of APIs and fix issues as they
arise though.
More flexibility means more maintenance, after all.
... it shows that the override I used previously won't work for `admin`.
Therefore we have to keep the actual value, instead of degenrating it.
Makes sense ... it's interesting how much one tends to hard-code things
to work just for a few cases, unless you opt in to see the whole picture
That way, we don't have recursive method builders, but instead
flatten the hierarchy. In our case, this is easier and means
less to type. E.g.
`hub.user().message().import(...)` now is
`hub.user().message_import(...)`
In go it would look like this though
`hub.user.messages.import(...)
which is neater.
We will never have that though, as it will initialize a massive amount
of data right on the stack, even though only some of it is ever used
... .
It works for uploads as well as for others.
Next up is to setup the head and authentication. It will be as simple
as calling and handling `GetToken`, even though I think that there
needs to be better support for the scope that is asked for ... .
With a big but ! The most simple thing to do it was to just add
additional type parameters to the respective method.
Now the type cannot be inferred, which means type-hints must be added.
This should be easy enough, but ... has to be done somehow.
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.