Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: some basic samples, plus two new exports #702

Merged
merged 1 commit into from
Jan 7, 2020
Merged

Conversation

alexander-fenster
Copy link
Contributor

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, and samples/ 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:

this._innerApiCalls[methodName] = gaxModule.createApiCall(
innerCallPromise,
defaults[methodName],
this._descriptors.page[methodName] ||
this._descriptors.stream[methodName] ||
this._descriptors.longrunning[methodName]
);

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.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 7, 2020
@codecov
Copy link

codecov bot commented Jan 7, 2020

Codecov Report

Merging #702 into master will increase coverage by 0.22%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #702      +/-   ##
=========================================
+ Coverage   89.68%   89.9%   +0.22%     
=========================================
  Files          41      43       +2     
  Lines        7522    7690     +168     
  Branches      407     407              
=========================================
+ Hits         6746    6914     +168     
  Misses        773     773              
  Partials        3       3
Impacted Files Coverage Δ
src/index.ts 97.12% <100%> (+0.08%) ⬆️
samples/pagination.js 100% <100%> (ø)
samples/quickstart.js 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e66e0f1...bdf55ca. Read the comment docs.

@alexander-fenster alexander-fenster merged commit 1204e2e into master Jan 7, 2020
@alexander-fenster alexander-fenster deleted the samples branch January 7, 2020 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants