GoogleFormsToolkitLibrary 1.0.2

A .Net toolkit library for accessing Google Forms pages programmatically.

Install-Package GoogleFormsToolkitLibrary -Version 1.0.2
dotnet add package GoogleFormsToolkitLibrary --version 1.0.2
<PackageReference Include="GoogleFormsToolkitLibrary" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GoogleFormsToolkitLibrary --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

How to?

Just install in your .Net project, and you're good go! ;)
Then in code simply instantiate GoogleFormsToolkitLibrary object in your code and start using.

LoadGoogleFormStructureAsync()

LoadGoogleFormStructureAsync(string yourGoogleFormsUrl)
Loading Google Form's generic information and Question Field list data including Question Type, Answer Options, Submission Id, etc

Example:
// Retrieve the structure of my sample Google Forms page
// https://docs.google.com/forms/d/e/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/viewform

var googleFormLink =
"https://docs.google.com/forms/d/e/" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"/viewform";

var googleFormsToolkitLibrary = new GoogleFormsToolkitLibrary();
var result = await googleFormsToolkitLibrary.LoadGoogleFormStructureAsync(googleFormLink);

SubmitToGoogleFormAsync()

SubmitToGoogleFormAsync(string yourGoogleFormsUrl, Dictionary&lt;string, string&gt; formData)
Submit Form data to your Google Form and returns Success or Fail status.

string yourGoogleFormsUrl: Link to your Google Form page
Dictionary&lt;string, string&gt; formData: Form data dictionary to submit.
Dictionary<string, string> Format <<TKey: FieldSubmissionId> : <TValue: Value>>

Example:
// Submit data to my sample Google Forms page
// https://docs.google.com/forms/d/e/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/viewform

var googleFormLink =
	"https://docs.google.com/forms/d/e/" +
	"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
	"/formResponse";

Dictionary<string,string> formData = new Dictionary<string, string>
{
	{"entry.1277095329", $"Purple Moon Rockets"}, // Question Field 1
	{"entry.995005981","Banana Plums"}, // Question Field 2
	{"entry.1155533672","Monkeys with hoodies"},  // Question Field 3
	{"entry.1579749043","Jumping Apples"}, // Question Field 4
};

var googleFormsToolkitLibrary = new GoogleFormsToolkitLibrary();
var result = await googleFormsToolkitLibrary.SubmitToGoogleFormAsync(googleFormLink, formData);

How to?

Just install in your .Net project, and you're good go! ;)
Then in code simply instantiate GoogleFormsToolkitLibrary object in your code and start using.

LoadGoogleFormStructureAsync()

LoadGoogleFormStructureAsync(string yourGoogleFormsUrl)
Loading Google Form's generic information and Question Field list data including Question Type, Answer Options, Submission Id, etc

Example:
// Retrieve the structure of my sample Google Forms page
// https://docs.google.com/forms/d/e/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/viewform

var googleFormLink =
"https://docs.google.com/forms/d/e/" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"/viewform";

var googleFormsToolkitLibrary = new GoogleFormsToolkitLibrary();
var result = await googleFormsToolkitLibrary.LoadGoogleFormStructureAsync(googleFormLink);

SubmitToGoogleFormAsync()

SubmitToGoogleFormAsync(string yourGoogleFormsUrl, Dictionary&lt;string, string&gt; formData)
Submit Form data to your Google Form and returns Success or Fail status.

string yourGoogleFormsUrl: Link to your Google Form page
Dictionary&lt;string, string&gt; formData: Form data dictionary to submit.
Dictionary<string, string> Format <<TKey: FieldSubmissionId> : <TValue: Value>>

Example:
// Submit data to my sample Google Forms page
// https://docs.google.com/forms/d/e/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/viewform

var googleFormLink =
	"https://docs.google.com/forms/d/e/" +
	"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
	"/formResponse";

Dictionary<string,string> formData = new Dictionary<string, string>
{
	{"entry.1277095329", $"Purple Moon Rockets"}, // Question Field 1
	{"entry.995005981","Banana Plums"}, // Question Field 2
	{"entry.1155533672","Monkeys with hoodies"},  // Question Field 3
	{"entry.1579749043","Jumping Apples"}, // Question Field 4
};

var googleFormsToolkitLibrary = new GoogleFormsToolkitLibrary();
var result = await googleFormsToolkitLibrary.SubmitToGoogleFormAsync(googleFormLink, formData);

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.2 73 12/17/2019
1.0.1 70 12/16/2019
1.0.0 49 12/16/2019