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.
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
Add sheets_create() #61
Add sheets_create() #61
Changes from 2 commits
f697470
8028dfb
4cf25b4
7ee9e43
05b1f2c
1104171
7aa6856
4121f39
ebf1c86
3f76282
8f8d8a4
0f53f80
e390229
e19ae1d
da74ca8
1102f48
e57d854
073110e
e07e569
a5da356
d2534b7
2a53d02
03b628a
ded50e4
7677711
3439414
0c5d929
fbf2375
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are ~200 so-called schemas in the Sheets API.
GridRange
is an example.Once you start writing and updating Sheets, you need to create a lot of bodies, in the REST sense, which was not true while we were only reading. And these bodies must be built up of (often nested) schemas. I have to create some sort of machinery around this.
What I do in this PR would not scale nicely to the full set of schemas, but is that necessary? I don't know. I definitely feel a bit like a schema-and-S3-creating robot, though.
But if I did something more automated re: class creation and validation, then it scales and, in fact, that would belong in gargle, for reuse across multiple APIs.
I don't know what to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to ~200 schemas there are lots of enums. They aren't particularly easy to pull out of the discovery document in a coherent way. But you could imagine doing so, in a fit of recursive fury, and create a way to declare something a enum, check supplied values against the valid ones, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto-generating an internal data structure and code around the enums sounds much easier to me (maybe even a clear "yes, do this"?) than doing same for the schemas.