PSGSuite
PSGSuite copied to clipboard
Dynamically Generating Functions for Slide/Doc/Sheet updates
I'm continuing the work @scrthq started in https://github.com/SCRT-HQ/PSGSuite/tree/feature/sheets_batch_update, currently in https://github.com/SCRT-HQ/PSGSuite/tree/release/2.37.0.
Currently everything "works" in that valid code is generated and it passes all tests (only help tests would apply here, I think). There are a few things that need to be worked on though, to make it more complete. I'm working on these myself currently, but just want to ensure the work is tracked in case I get pulled away.
- [x]
Invoke-HelperFunctionGenerationuses different parameter list code for generating function and determining sub-types to create - [x] If the Request takes a
System.Collections.Generic.IListfor a list of some Google-specific type, a function to create that object is not generated - [x]
System.Collections.Generic.IListis not native to PowerShell and can be a little confusing and difficult to work with. Automate the conversation of simple PowerShell arrays into this type inInvoke-BatchUpdateFunctionGeneration, similar to how it's done inInvoke-HelperFunctionGeneration. - [x] Same as above but with
System.Collections.Generic.IDictionary. I added this HelperFunction, add it to BatchUpdateFunction as well - [x] This is all built on a fair number of assumptions about the structure of these .Net objects, so add tests that verify these assumptions, in case future changes to the library make them no longer true (doubtful, but I already wrote most of the code for this anyway)