<commit_before>dotMailer API v2 PHP client
===============
(c) 2014 <NAME>, http://pitak.net <<EMAIL>>

PHP client library for the dotMailer v2 (REST) API with **MULTIPLE ACCOUNTS SUPPORT!**

Basic Usage
-----------

	<?php

		/*
		 * ========== single account usage ==========
		 */

		$credentials = array(
			'username' =>  '<EMAIL>',
			'password' => '<PASSWORD>'
		);

		$account = Container::newAccount($credentials);

		echo $account->getInfo();


		/*
		 * ========== MULTIPLE ACCOUNTS usage ==========
		 */

		$credentials = array(
			'master' => array(
				'username' =>  '<EMAIL>',
				'password' => '<PASSWORD>'
			),
			'group1' => array(
				'g1-account1' => array(
					'username' =>  '<EMAIL>',
					'password' => '<PASSWORD>'
				),
				'g1-account2' => array(
					'username' =>  '<EMAIL>',
					'password' => '<PASSWORD>'
				)
			)
		);

		$container = Container::newContainer($credentials);

		echo $container->master->contacts->getAll();

		foreach ($container->group1 as $account) {
			echo $account->dataFields->create('MY_DATA_FIELD');
		}

	?>


TODO
----
solve output formats

	strings
	arrays
	data classes

add custom exceptions

solve error codes in RestClient



<commit_msg>README update<commit_after>dotMailer API v2 PHP client
===============
(c) 2014 <NAME>, http://pitak.net <<EMAIL>>

PHP client library for the dotMailer v2 (REST) API with **MULTIPLE ACCOUNTS SUPPORT!**

Single account usage
--------------------

	<?php

		$credentials = array(
			'username' =>  '<EMAIL>',
			'password' => '<PASSWORD>'
		);

		$account = Container::newAccount($credentials);

		echo $account->getInfo();

	?>

Multiple accounts usage
-----------------------

	<?php

		$credentials = array(
			'master' => array(
				'username' =>  '<EMAIL>',
				'password' => '<PASSWORD>'
			),
			'group1' => array(
				'g1-account1' => array(
					'username' =>  '<EMAIL>',
					'password' => '<PASSWORD>'
				),
				'g1-account2' => array(
					'username' =>  '<EMAIL>',
					'password' => '<PASSWORD>'
				)
			)
		);

		$container = Container::newContainer($credentials);

		echo $container->master->contacts->getAll();

		foreach ($container->group1 as $account) {
			echo $account->dataFields->create('MY_DATA_FIELD');
		}

	?>

TODO
----
solve output formats

	strings
	arrays
	data classes

add custom exceptions

solve error codes in RestClient




{'fraction_non_alphanumeric': 0.2161249472351203, 'fraction_numerical': 0.010130856901646263, 'mean_word_length': 3.0306122448979593, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 66, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '7080448', 'n_tokens_mistral': 943, 'n_tokens_neox': 776, 'n_words': 180}