feat: some basic samples, plus two new exports #702
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So... I did not expect that gax will ever get any kind of samples, but I just found that I've been using these two code snippets to explain how
createApiCall
works, andsamples/
folder is probably a good place for them. For any new team member, this might be a good place to go to understand what that weird piece of code in the client libraries actually does:gax-nodejs/test/fixtures/google-gax-packaging-test-app/src/v1beta1/echo_client.js
Lines 207 to 213 in e66e0f1
If we get lucky, I might find some time to showcase streaming, long running operations, and
createStub
in the same way.Re: license change - the whole package uses BSD 3-clause, the samples package was empty, so I see no problem with changing the license to BSD to match the other files in the package.
Re: new exports - just some useful functions which, for some reasons, were never exported.