Closed LindaLawton closed 7 years ago
Update I am working with the Google Analytics API team to automatically import the sample code to the documentation. Once we have templates for all of the langues we will be able to standardize and ensure that we can have up to-date examples in all of the documentation pages.
Samples are now being generated automatically. No way to fix the issue with Google Analytics V4
I am currently working on an application that automatically generates standardized Sample projects for the Google .net client library.
I currently have 135 sample projects generated size 85 mb in total. I am generating for all versions of the APIs found in the Discovery services.
My hope is this will give us a way of creating some best practices standards for usage of the Client library. The code should be simple to use and make it easier for new developers to access the Google APIs. Each method supplies a link directly to its documentation on Google developers website, and gives information on the different parameters needed to make the request.
Example
I will upload a single generated example in a branch so that we can do a code review before I upload them all. This will probably be either Google Analytics or Google Drive as i know those APIs the best and we will be able to work out how to show usage of upload and download.
Sample currently under review: Google Analytics v3
Issues
I am unable to programmatic create the packages.config users will have to run the NuGet package manually to get the necessary references to run the application. I have added a link and the command to the README.md for each project directly to the package needed. I was hoping we could have just used NuGet package restore but currently this isn't possible.
I would like to see if i can find a way of validating the public API key, client id, client secret, and service account email addresses for the Authentication methods. Validating Google credentials
Future Plans I would like to automated it so that the application checks for changes in Discovery services and regenerates a new sample when needed and uploads them directly to GitHub. For this to work the application will need to build the sample as well to insure there are no errors. There is a problem with this due to the in ability to generate the packages.config. Build will have to add the NuGet package we can not rely on NuGet package restore.
Note: Because I am using T4 templates it will be possible to create templates for the other client library's at a later date. This issue will only be related to generation of the .net samples.