<commit_before>StormOnDemandAPI
================

C# Library to assist with using the Storm On Demand API.

Uses Newtonsoft's JSON library, Modified for Liquid Web's Storm API
Compatible with .Net 3.5 on Linux and .Net 3.0, 3.5, 4, 4.5 on Windows

Can deserialize/serialize Classes, Hashtables, Dictionarys, Objects, Dynamic Objects to and from JSON or XML format.

The APIMethods folder isn't required. It's just a set of helper classes there to make it easier when using an IDE 
with intellisense to remember the methods Along with the commenting that will display as tooltips for each method.

The APIRequests/APIResponses folders also aren't required. The dynamic classes will however be needed if your building
objects to post to the api dynamically. The other classes are just examples of how you can serialize/deserialize classes
properties->values into valid JSON strings.

## Examples 

The following examples show how to build API requests with and without the helper classes or dynamic classes.
Throughout the examples its implied you set the username and password in the auth.cs via

Auth.username = user;
Auth.password = password; 

All of the below use the APIMethods helper classes, you can get the same output without using them simply using APIHandler.Post and passing in the method with the object. ie: string result = APIHandler.Post( "/Storm/Config/list", configList);

#### using GenericRequest dynamic object class
 
	// Storm/Config/list example

	dynamic configList = new GenericRequest();
	configList.category = "storm";	// will parse this into json as { "category" : "storm" }

	string result = APIMethods.Storm.Config.List( configList.values );

#### Using Dictionarys or Hashtables instead of a dynamic object

	// Storm/Config/list example

	Dictionary<string, dynamic> configList = new Dictionary<string, dynamic>();
	configList.Add ("category", "storm");

	string result = APIMethods.Storm.Config.List( configList );

#### Using a defined class object to serialize into JSON

	public class StormConfigList
	{
		public string category { get; set; }
	}

	StormConfigList stormConfig = new StormConfigList();
	stormConfig.category = "storm";

	string result = APIMethods.Storm.Config.List( stormConfig );

#### Storing API results into a class object

	// Examples using classes for the APIRequest and one to store the APIResponse

	public class IPDetailsRequest
	{
		public string uniq_id { get; set; }
		public string ip { get; set; }
	}

	public class IPDetailsResponse
	{
		public string broadcast { get; set; }
		public string gateway{ get; set; }
		public string ip { get; set; }
		public string netmask { get; set; }
		public string id { get; set; }
	}

	IPDetailsRequest req = new IPDetailsRequest();
	req.uniq_id = "ABCDEF";
	req.ip = "192.168.3.11";
	// Builds JSON from IPDetailsRequest and stores the response from the API in the APIResponse object
	IPDetailsResponse res = JsonConvert.DeserializeObject<IPDetailsResponse>( APIMethods.Network.IP.Details( req ));
	
	// Can access members of the object as any other class
	string serverIP =  res.ip ;
<commit_msg>fix typos<commit_after>StormOnDemandAPI
================

C# Library to assist with using the Storm On Demand API.

Uses Newtonsoft's JSON library, Modified for Liquid Web's Storm API
Compatible with .Net 3.5 on Linux and .Net 3.0, 3.5, 4, 4.5 on Windows

Can deserialize/serialize Classes, Hashtables, Dictionaries, Objects, Dynamic Objects to and from JSON or XML format.

The APIMethods folder isn't required. It's just a set of helper classes there to make it easier when using an IDE 
with intellisense to remember the methods Along with the commenting that will display as tooltips for each method.

The APIRequests/APIResponses folders also aren't required. The dynamic classes will however be needed if your building
objects to post to the api dynamically. The other classes are just examples of how you can serialize/deserialize classes
properties->values into valid JSON strings.

## Examples 

The following examples show how to build API requests with and without the helper classes or dynamic classes.
Throughout the examples its implied you set the username and password in the auth.cs via

Auth.username = user;
Auth.password = password; 

All of the below use the APIMethods helper classes, you can get the same output without using them simply using APIHandler.Post and passing in the method with the object. ie: string result = APIHandler.Post( "/Storm/Config/list", configList);

#### using GenericRequest dynamic object class
 
	// Storm/Config/list example

	dynamic configList = new GenericRequest();
	configList.category = "storm";	// will parse this into json as { "category" : "storm" }

	string result = APIMethods.Storm.Config.List( configList.values );

#### Using Dictionaries or Hashtables instead of a dynamic object

	// Storm/Config/list example

	Dictionary<string, dynamic> configList = new Dictionary<string, dynamic>();
	configList.Add ("category", "storm");

	string result = APIMethods.Storm.Config.List( configList );

#### Using a defined class object to serialize into JSON

	public class StormConfigList
	{
		public string category { get; set; }
	}

	StormConfigList stormConfig = new StormConfigList();
	stormConfig.category = "storm";

	string result = APIMethods.Storm.Config.List( stormConfig );

#### Storing API results into a class object

	// Examples using classes for the APIRequest and one to store the APIResponse

	public class IPDetailsRequest
	{
		public string uniq_id { get; set; }
		public string ip { get; set; }
	}

	public class IPDetailsResponse
	{
		public string broadcast { get; set; }
		public string gateway{ get; set; }
		public string ip { get; set; }
		public string netmask { get; set; }
		public string id { get; set; }
	}

	IPDetailsRequest req = new IPDetailsRequest();
	req.uniq_id = "ABCDEF";
	req.ip = "192.168.3.11";
	// Builds JSON from IPDetailsRequest and stores the response from the API in the APIResponse object
	IPDetailsResponse res = JsonConvert.DeserializeObject<IPDetailsResponse>( APIMethods.Network.IP.Details( req ));
	
	// Can access members of the object as any other class
	string serverIP =  res.ip ;

{'fraction_non_alphanumeric': 0.07868429538858433, 'fraction_numerical': 0.005804579168010319, 'mean_word_length': 4.338209982788296, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2289367', 'n_tokens_mistral': 1741, 'n_tokens_neox': 1670, 'n_words': 761}