| subject; ?> |
- sent_date)); ?> |
+ sent_at)); ?> |
- Opened: total_opens; ?>
- Sent: total_sent; ?>
diff --git a/tests/aweber_api.test.php b/tests/AWeberAPITest.php
similarity index 62%
rename from tests/aweber_api.test.php
rename to tests/AWeberAPITest.php
index de53745..6d4c4cc 100644
--- a/tests/aweber_api.test.php
+++ b/tests/AWeberAPITest.php
@@ -1,9 +1,11 @@
adapter = new MockOAuthAdapter();
+ $this->adapter = get_mock_adapter();
$this->app = array(
'key' => 'RogsGzUw3QAK6cPSI24u',
'secret' => '1eaHAFJnEklS8qSBvitvSO6OCkaU4QyHU3AOE1rw',
@@ -15,18 +17,14 @@ public function setUp() {
'token' => 'lc0UcVJdlpNyVVMLzeZWZZGb61pEnlhBdHGg9usF',
'secret' => 'VMus5FW1TyX7N24xaOyc0VsylGBHC6rAomq3LM67',
);
-
}
/**
* App keys given at construction should be maintained internally
*/
public function test_should_contain_app_keys() {
- $this->assertEqual($this->aweber->consumerKey,
- $this->app['key']);
- $this->assertEqual($this->aweber->consumerSecret,
- $this->app['secret']);
-
+ $this->assertEquals($this->aweber->consumerKey, $this->app['key']);
+ $this->assertEquals($this->aweber->consumerSecret, $this->app['secret']);
}
/**
@@ -34,7 +32,7 @@ public function test_should_contain_app_keys() {
*/
public function test_should_allow_setting_oauth_adapter() {
$this->aweber->setAdapter($this->adapter);
- $this->assertEqual($this->aweber->adapter, $this->adapter);
+ $this->assertEquals($this->aweber->adapter, $this->adapter);
}
/**
@@ -44,22 +42,18 @@ public function test_should_raise_exception_if_auth_fails() {
MockData::$oauth = false;
$this->aweber->setAdapter($this->adapter);
try {
- $account = $this->aweber->getAccount($this->user['token'],
- $this->user['secret']);
+ $account = $this->aweber->getAccount($this->user['token'], $this->user['secret']);
$this->assertTrue(false, 'This should not run due to an exception');
}
- catch (Exception $e) {
- $this->assertTrue(is_a($e, 'Exception'));
- }
+ catch (Exception $e) { }
MockData::$oauth = true;
}
- public function test_should_return_null_after_authorization() {
+ public function test_should_work_after_authorization() {
$this->aweber->setAdapter($this->adapter);
- $account = $this->aweber->getAccount($this->user['token'],
- $this->user['secret']);
- $list = $account->lists->getById(123456);
- $this->assertTrue(empty($list));
+ $account = $this->aweber->getAccount($this->user['token'], $this->user['secret']);
+ $list = $account->lists->getById(303449);
+ $this->assertEquals($list->id, 303449);
}
/**
@@ -68,8 +62,8 @@ public function test_should_return_null_after_authorization() {
*/
public function test_getAccount() {
$this->aweber->setAdapter($this->adapter);
- $account = $this->aweber->getAccount($this->user['token'],
- $this->user['secret']);
+ $account = $this->aweber->getAccount($this->user['token'], $this->user['secret']);
+
$this->assertNotNull($account);
$this->assertTrue(is_a($account, 'AWeberResponse'));
$this->assertTrue(is_a($account, 'AWeberEntry'));
@@ -85,9 +79,22 @@ public function test_loadFromUrl() {
$list = $this->aweber->loadFromUrl('/accounts/1/lists/303449');
$this->assertTrue(is_a($list, 'AWeberEntry'));
- $this->assertEqual($list->type, 'list');
- $this->assertEqual($list->id, '303449');
+ $this->assertEquals($list->type, 'list');
+ $this->assertEquals($list->id, '303449');
}
+ /**
+ * Load from URL should take a relative URL and return the correct
+ * object based on that request. Allows skipping around the tree
+ * based on URLs, not just walking it.
+ */
+ public function test_loadFromUrl_broadcast() {
+ $this->aweber->setAdapter($this->adapter);
+ $list = $this->aweber->loadFromUrl('/accounts/1/lists/303449/broadcasts/1337');
+
+ $this->assertTrue(is_a($list, 'AWeberEntry'));
+ $this->assertEquals($list->type, 'broadcast');
+ $this->assertEquals($list->broadcast_id, '1337');
+ }
}
?>
diff --git a/tests/AWeberCollectionFindTest.php b/tests/AWeberCollectionFindTest.php
new file mode 100644
index 0000000..9cc62fb
--- /dev/null
+++ b/tests/AWeberCollectionFindTest.php
@@ -0,0 +1,76 @@
+adapter = get_mock_adapter();
+ $this->subscribers = $this->_getCollection('/accounts/1/lists/303449/subscribers');
+ $this->lists = $this->_getCollection('/accounts/1/lists');
+ $this->adapter->clearRequests();
+ }
+
+ /**
+ * Return AWeberCollection
+ */
+ public function _getCollection($url) {
+ $data = $this->adapter->request('GET', $url);
+ return new AWeberCollection($data, $url, $this->adapter);
+ }
+
+ /**
+ * Find That Returns Entries
+ */
+ public function testFind_ReturnsEntries() {
+
+ $found_subscribers = $this->subscribers->find(array('email' => 'someone@example.com'));
+
+ # Asserts on the API request
+ $expected_url = $this->subscribers->url . '?email=someone%40example.com&ws.op=find';
+ $this->assertEquals(sizeOf($this->adapter->requestsMade), 2);
+ $req = $this->adapter->requestsMade[0];
+ $this->assertEquals($req['method'], 'GET');
+ $this->assertEquals($req['uri'], $expected_url);
+ $this->assertEmpty($req['headers'], "Find request shouldn't have a Content-Type header");
+
+ $req = $this->adapter->requestsMade[1];
+ $this->assertEquals($req['method'], 'GET');
+ $this->assertEquals($req['uri'], $expected_url . "&ws.show=total_size");
+ $this->assertEmpty($req['headers'], "Find request shouldn't have a Content-Type header");
+
+ # Asserts on the returned data
+ $this->assertTrue(is_a($found_subscribers, 'AWeberCollection'));
+ $this->assertEquals($this->adapter, $found_subscribers->adapter);
+ $this->assertEquals($found_subscribers->url, $this->subscribers->url);
+ $this->assertEquals($found_subscribers->total_size, 1);
+ }
+
+ /**
+ * Find That Does Not Return Entries
+ */
+ public function testFindDoesNot_ReturnsEntries() {
+
+ $found_subscribers = $this->subscribers->find(array('email' => 'nonexist@example.com'));
+
+ # Asserts on the API request
+ $expected_url = $this->subscribers->url . '?email=nonexist%40example.com&ws.op=find';
+ $this->assertEquals(sizeOf($this->adapter->requestsMade), 2);
+ $req = $this->adapter->requestsMade[0];
+ $this->assertEquals($req['method'], 'GET');
+ $this->assertEquals($req['uri'], $expected_url);
+ $this->assertEmpty($req['headers'], "Find request shouldn't have a Content-Type header");
+
+ $req = $this->adapter->requestsMade[1];
+ $this->assertEquals($req['method'], 'GET');
+ $this->assertEquals($req['uri'], $expected_url . "&ws.show=total_size");
+ $this->assertEmpty($req['headers'], "Find request shouldn't have a Content-Type header");
+
+ # Asserts on the returned data
+ $this->assertTrue(is_a($found_subscribers, 'AWeberCollection'));
+ $this->assertEquals($this->adapter, $found_subscribers->adapter);
+ $this->assertEquals($found_subscribers->url, $this->subscribers->url);
+ $this->assertEquals($found_subscribers->total_size, 0);
+ }
+
+}
diff --git a/tests/AWeberCollectionParentEntryTest.php b/tests/AWeberCollectionParentEntryTest.php
new file mode 100644
index 0000000..7730d96
--- /dev/null
+++ b/tests/AWeberCollectionParentEntryTest.php
@@ -0,0 +1,36 @@
+adapter = get_mock_adapter();
+ $url = '/accounts/1/lists';
+ $data = $this->adapter->request('GET', $url);
+ $this->lists = new AWeberCollection($data, $url, $this->adapter);
+ $url = '/accounts';
+ $data = $this->adapter->request('GET', $url);
+ $this->accounts = new AWeberCollection($data, $url, $this->adapter);
+ $url = '/accounts/1/lists/303449/custom_fields';
+ $data = $this->adapter->request('GET', $url);
+ $this->customFields = new AWeberCollection($data, $url, $this->adapter);
+ }
+
+ public function testListsParentShouldBeAccount() {
+ $entry = $this->lists->getParentEntry();
+ $this->assertTrue(is_a($entry, 'AWeberEntry'));
+ $this->assertEquals($entry->type, 'account');
+ }
+
+ public function testCustomFieldsParentShouldBeList() {
+ $entry = $this->customFields->getParentEntry();
+ $this->assertTrue(is_a($entry, 'AWeberEntry'));
+ $this->assertEquals($entry->type, 'list');
+ }
+
+ public function testAccountsParentShouldBeNULL() {
+ $entry = $this->accounts->getParentEntry();
+ $this->assertEquals($entry, NULL);
+ }
+}
diff --git a/tests/AWeberCollectionTest.php b/tests/AWeberCollectionTest.php
new file mode 100644
index 0000000..7263e7d
--- /dev/null
+++ b/tests/AWeberCollectionTest.php
@@ -0,0 +1,254 @@
+adapter = get_mock_adapter();
+ $this->subscribers = new AWeberCollection(
+ $this->adapter->request('GET', $url),
+ $url,
+ $this->adapter);
+ $this->adapter->clearRequests();
+ $this->params = array('status' => 'unsubscribed', 'ws.size' => 1, 'ws.start' => 0);
+ $this->found = $this->subscribers->find($this->params);
+ }
+
+ /**
+ * Test to ensure that the nested objects, such as "custom_fields", are formatted correctly for GET request. The
+ * nested objects should be a JSON encoded string.
+ */
+ public function testFormatOfGetData() {
+ $findParams = array('custom_fields' => array('test' => 'test'));
+ $expectedUri = '/accounts/1/lists/303449/subscribers?custom_fields=%7B%22test%22%3A%22test%22%7D&ws.op=find';
+
+ $this->adapter->clearRequests();
+
+ $resp = $this->subscribers->find($findParams);
+
+ $req = $this->adapter->requestsMade[0];
+ $this->assertEquals($req['method'], 'GET');
+ $this->assertEquals($expectedUri, $req['uri']);
+ $this->assertEmpty($req['headers'], "Find request shouldn't have a Content-Type header");
+ }
+
+ /**
+ * Checks that the nested objects, such as "custom_fields", are formatted correctly. The "create" method
+ * is a POST with Content-Type of 'application/json'. The data should be formatted as JSON.
+ */
+ public function testFormatOfPostData() {
+
+ $createParams = array(
+ 'email' => 'test@example.com',
+ 'ip_address' => '127.0.0.1',
+ 'name' => 'John Doe',
+ 'custom_fields' => array(
+ 'custom' => 'test'
+ )
+ );
+
+ $expectedCreateParams = array(
+ 'ws.op' => 'create',
+ 'email' => 'test@example.com',
+ 'ip_address' => '127.0.0.1',
+ 'name' => 'John Doe',
+ 'custom_fields' => array(
+ 'custom' => 'test'
+ )
+ );
+
+ $this->adapter->clearRequests();
+
+ $resp = $this->subscribers->create($createParams);
+
+ $req = $this->adapter->requestsMade[0];
+ $this->assertEquals($req['method'], 'POST');
+ $this->assertEquals($req['data'], $expectedCreateParams);
+ $this->assertEquals(array('Content-Type: application/json'), $req['headers'], "Create request should have a Content-Type header");
+
+ }
+
+ /**
+ * The find method makes two requests, one for the collection, and the other to get total_size.
+ */
+ public function testShouldInitiallyMake2APIRequests() {
+ $this->assertEquals(count($this->adapter->requestsMade), 2);
+ }
+
+ /**
+ * The first of two requests, verify the url to get the collection.
+ */
+ public function testShouldRequestCollectionPageFirst() {
+ #$this->subscribers->find($this->params);
+ $uri = $this->adapter->requestsMade[0]['uri'];
+ $this->assertEquals($uri, '/accounts/1/lists/303449/subscribers?status=unsubscribed&ws.op=find&ws.size=1&ws.start=0');
+ }
+
+ /**
+ * The second of two requests, verify the url to get the total size.
+ */
+ public function testShouldRequestTotalSizePageSecond() {
+ $uri = $this->adapter->requestsMade[1]['uri'];
+ $this->assertEquals($uri, '/accounts/1/lists/303449/subscribers?status=unsubscribed&ws.op=find&ws.show=total_size&ws.size=1&ws.start=0');
+ }
+
+ /**
+ * Pagination: An additional fetch is made when there is a next_collection_link included
+ */
+ public function testShouldFetchDataforDataNotPreviouslyLoaded() {
+ $this->adapter->clearRequests();
+ $subscriber = $this->found[1];
+ $this->assertEquals(count($this->adapter->requestsMade), 1);
+ }
+
+ /**
+ * Pagination: the first of two requests for the next fetch. Verify the url to get the next collection.
+ */
+ public function testShouldRequestCorrectCollectionPage() {
+ $this->adapter->clearRequests();
+ $subscriber = $this->found[1];
+ $uri = $this->adapter->requestsMade[0]['uri'];
+ $this->assertEquals($uri, '/accounts/1/lists/303449/subscribers?status=unsubscribed&ws.op=find&ws.size=1&ws.start=1');
+ }
+
+ /**
+ * Pagination: the second of two requests for the next fetch. Verify the url to get the total size of the next collection.
+ */
+ public function testShouldFetchCorrectDataOnSecondPage() {
+ $this->adapter->clearRequests();
+ $subscriber = $this->found[1];
+ $this->assertEquals($subscriber->data['self_link'], 'https://api.aweber.com/1.0/accounts/1/lists/303449/subscribers/50205518');
+ }
+}
+
+
+class TestAWeberCollection extends PHPUnit_Framework_TestCase {
+
+ /**
+ * Run before each test. Sets up mock adapter, which uses fixture
+ * data for requests, and creates a new collection.
+ */
+ public function setUp() {
+ $this->adapter = get_mock_adapter();
+ $this->url = '/accounts/1/lists';
+ $data = $this->adapter->request('GET', $this->url);
+ $this->collection = new AWeberCollection($data, $this->url, $this->adapter);
+ }
+
+ /**
+ * Should have the total size available.
+ */
+ public function testShouldHaveTotalSize() {
+ $this->assertEquals($this->collection->total_size, 24);
+ }
+
+ /**
+ * Should have the URL used to generate this collection
+ */
+ public function testShouldHaveURL() {
+ $this->assertEquals($this->collection->url, $this->url);
+ }
+
+ /**
+ * Should not allow direct access to the entries data retreived from
+ * the request.
+ */
+ public function testShouldNotAccessEntries() {
+ $this->assertNull($this->collection->entries);
+ }
+
+ /**
+ * Should allow entries to be accessed as an array
+ */
+ public function testShouldAccessEntiresAsArray() {
+ $entry = $this->collection[0];
+ $this->assertTrue(is_a($entry, 'AWeberResponse'));
+ $this->assertTrue(is_a($entry, 'AWeberEntry'));
+ $this->assertEquals($entry->id, 1701533);
+ }
+
+ public function testShouldKnowItsCollectionType() {
+ $this->assertEquals($this->collection->type, 'lists');
+ }
+
+ /**
+ * When accessing an offset out of range, should return null
+ */
+ public function testShouldNotAccessEntriesOutOfRange() {
+ $this->assertNull($this->collection[26]);
+ }
+
+ /**
+ * When accessing entries by offset, should only make a request when
+ * accessing entries not in currenlty loaded pages.
+ */
+ public function testShouldLazilyLoadAdditionalPages() {
+ $this->adapter->clearRequests();
+
+ $this->assertEquals(sizeof($this->collection->data['entries']), 20);
+
+ $entry = $this->collection[19];
+ $this->assertEquals($entry->id, 1424745);
+ $this->assertTrue(empty($this->adapter->requestsMade));
+
+ $entry = $this->collection[20];
+ $this->assertEquals($entry->id, 1364473);
+ $this->assertEquals(count($this->adapter->requestsMade), 1);
+
+ $entry = $this->collection[21];
+ $this->assertEquals($entry->id, 1211626);
+ $this->assertEquals(count($this->adapter->requestsMade), 1);
+ }
+
+ /**
+ * Should implement the Iterator interface
+ */
+ public function testShouldBeAnIterator() {
+ $this->assertTrue(is_a($this->collection, 'Iterator'));
+ }
+
+ /**
+ * When accessed as an iterator, should return entries by offset,
+ * from 0 to n-1.
+ */
+ public function testShouldAllowIteration() {
+ $count = 0;
+ foreach ($this->collection as $index => $entry) {
+ $this->assertEquals($index, $count);
+ $count++;
+ }
+ $this->assertEquals($count, $this->collection->total_size);
+ }
+
+ /**
+ * getById - should return an AWeberEntry with the given id
+ */
+ public function testShouldAllowGetById() {
+ $id = 303449;
+ $name = 'default303449';
+ $this->adapter->clearRequests();
+ $entry = $this->collection->getById($id);
+
+ $this->assertEquals($entry->id, $id);
+ $this->assertEquals($entry->name, $name);
+ $this->assertTrue(is_a($entry, 'AWeberEntry'));
+ $this->assertEquals(count($this->adapter->requestsMade), 1);
+
+
+ $this->assertEquals($this->adapter->requestsMade[0]['uri'],
+ '/accounts/1/lists/303449');
+ }
+
+ /**
+ * Should implement the countable interface, allowing count() and sizeOf()
+ * functions to work properly
+ */
+ public function testShouldAllowCountOperations() {
+ $this->assertEquals(count($this->collection), $this->collection->total_size);
+ $this->assertEquals(sizeOf($this->collection), $this->collection->total_size);
+ }
+
+}
diff --git a/tests/AWeberCreateEntryTest.php b/tests/AWeberCreateEntryTest.php
new file mode 100644
index 0000000..ede35ea
--- /dev/null
+++ b/tests/AWeberCreateEntryTest.php
@@ -0,0 +1,197 @@
+adapter = get_mock_adapter();
+
+ # Get CustomFields
+ $url = '/accounts/1/lists/303449/custom_fields';
+ $data = $this->adapter->request('GET', $url);
+ $this->custom_fields = new AWeberCollection($data, $url, $this->adapter);
+
+ $subscribers_url = '/accounts/1/lists/303449/subscribers';
+ $this->subscribers = new AWeberCollection(
+ $this->adapter->request('GET', $subscribers_url),
+ $subscribers_url,
+ $this->adapter);
+ }
+
+ /**
+ * Create Custom Field Success
+ *
+ * A unit test of a successful call to the Collection create method.
+ * Testing is limited to the Collection module; the OAuthAdapater
+ * module that handles the communications with the AWeber Public
+ * API Web Service is stubbed out.
+ */
+ public function testCreateCustomFieldSuccess() {
+
+ $this->adapter->clearRequests();
+ $resp = $this->custom_fields->create(array('name' => 'AwesomeField'));
+
+
+ $this->assertEquals(sizeOf($this->adapter->requestsMade), 2);
+
+ $req = $this->adapter->requestsMade[0];
+ $this->assertEquals($req['method'], 'POST');
+ $this->assertEquals($req['uri'], '/accounts/1/lists/303449/custom_fields?name=AwesomeField&ws.op=create');
+ $this->assertEquals($req['data'], array(
+ 'ws.op' => 'create',
+ 'name' => 'AwesomeField'));
+ $this->assertEmpty($req['headers'], "Custom Field create request should have a Content-Type header");
+
+ $req = $this->adapter->requestsMade[1];
+ $this->assertEquals($req['method'], 'GET');
+ $this->assertEquals($req['uri'], '/accounts/1/lists/303449/custom_fields/2');
+ $this->assertEmpty($req['headers'], "Get Custom fields request shouldn't have a Content-Type header");
+ }
+
+ /**
+ * Create Success
+ *
+ * A unit test of a successful call to the Collection create method.
+ * Testing is limited to the Collection module; the OAuthAdapater
+ * module that handles the communications with the AWeber Public
+ * API Web Service is stubbed out.
+ */
+ public function testCreateSubscriberSuccess() {
+
+ $this->adapter->clearRequests();
+ $resp = $this->subscribers->create(array('email' => 'test@test.com'));
+
+
+ $this->assertEquals(sizeOf($this->adapter->requestsMade), 2);
+
+ $req = $this->adapter->requestsMade[0];
+ $this->assertEquals($req['method'], 'POST');
+ $this->assertEquals($req['data'], array(
+ 'ws.op' => 'create',
+ 'email' => 'test@test.com'));
+ $this->assertEquals(array('Content-Type: application/json'), $req['headers'], "Create request should have a Content-Type header");
+
+ $req = $this->adapter->requestsMade[1];
+ $this->assertEquals($req['method'], 'GET');
+ $this->assertEquals($req['uri'], '/accounts/1/lists/303449/subscribers/3');
+ $this->assertEmpty($req['headers'], "Get subscriber request shouldn't have a Content-Type header");
+ }
+
+ /**
+ * Create Success With Adapter
+ *
+ * A unit test of a successful call to the Collection create method.
+ * Testing covers calls to the OAuthAdapter module, though the actual call
+ * to the Public API is mocked.
+ *
+ * Verifies that a Custom Field with the specified name is returned in the
+ * response.
+ *
+ * Note! The actual Web Service responses contain additional headers and
+ * response attributes that are not currently relevant to these tests.
+ */
+ public function testCreateSuccessWithAdapter() {
+
+ // Define the fake AWeber API responses.
+ $getCollectionRsp =
+<<getMock('CurlObject');
+ $stub->expects($this->any())
+ ->method('execute')
+ ->will($this->onConsecutiveCalls($postCustomFieldRsp,
+ $getCustomFieldRsp));
+ $aweber->adapter->curl = $stub;
+
+ // Create an empty custom field collection to work on.
+ $url = "/accounts/12345/lists/67890/custom_fields";
+ $data = json_decode($getCollectionRsp, true);
+ $custom_fields = new AWeberCollection($data, $url, $aweber->adapter);
+
+ // Finally the actual unit test. Create the new custom field
+ $rsp = $custom_fields->create(array('name' => 'Field With Spaces'));
+ $this->assertEquals($rsp->data['name'],'Field With Spaces');
+ }
+
+ /**
+ * Create Failure With Adapter
+ *
+ * A unit test of a failed call to the Collection create method.
+ * Testing covers calls to the OAuthAdapter module, though the actual call
+ * to the Public API is mocked.
+ *
+ * Verifies that an AWeberAPIException is thrown as a result of a
+ * disallowed character.
+ *
+ * Note! The actual Web Service responses contain additional headers and
+ * response attributes that are not currently relevant to these tests.
+ */
+ public function testCreateFailureWithAdapter() {
+
+ // Define the fake AWeber API responses.
+ $getCollectionRsp =
+<<getMock('CurlObject');
+ $stub->expects($this->any())
+ ->method('execute')
+ ->will($this->returnValue($postCustomFieldRsp));
+ $aweber->adapter->curl = $stub;
+
+ // Create an empty custom field collection to work on.
+ $url = "/accounts/12345/lists/67890/custom_fields";
+ $data = json_decode($getCollectionRsp, true);
+ $custom_fields = new AWeberCollection($data, $url, $aweber->adapter);
+
+ // Create the new custom field
+ try {
+ $rsp = $custom_fields->create(array('name' => 'Field+With+Plus+Chars'));
+ }
+
+ // Finally the actual unit test. Verify that the create fails.
+ catch (AWeberAPIException $expected){
+ $this->assertEquals($expected->status, 400);
+ return;
+ }
+ $this->fail('An AWeberResponseError was not raised');
+ }
+}
diff --git a/tests/AWeberEntryTest.php b/tests/AWeberEntryTest.php
new file mode 100644
index 0000000..82842ce
--- /dev/null
+++ b/tests/AWeberEntryTest.php
@@ -0,0 +1,468 @@
+adapter = get_mock_adapter();
+ $url = '/accounts/1/lists/303449';
+ $data = $this->adapter->request('GET', $url);
+ $this->entry = new AWeberEntry($data, $url, $this->adapter);
+ }
+
+ /**
+ * Should be an AWeberEntry
+ */
+ public function testShouldBeAnAWeberEntry() {
+ $this->assertTrue(is_a($this->entry, 'AWeberEntry'));
+ }
+
+ /**
+ * AWeberEntry should be an AWeberResponse
+ */
+ public function testShouldBeAnAWeberResponse() {
+ $this->assertTrue(is_a($this->entry, 'AWeberResponse'));
+ }
+
+ /**
+ * Should be able to access the id property (global to all entries)
+ */
+ public function testShouldBeAbleToAccessId() {
+ $this->assertEquals($this->entry->id, 303449);
+ }
+
+ /**
+ * Should be able to access name (or any property unique to the response)
+ */
+ public function testShouldBeAbleToAccessName() {
+ $this->assertEquals($this->entry->name, 'default303449');
+ }
+
+ /**
+ * Should be able to discern its type based on its data
+ */
+ public function testShouldKnowItsType() {
+ $this->assertEquals($this->entry->type, 'list');
+ }
+
+ /**
+ * When access properties it does not have, but are known sub collections,
+ * it will request for it and return the new collection object.
+ */
+ public function testShouldProvidedCollections() {
+ $this->adapter->clearRequests();
+ $campaigns = $this->entry->campaigns;
+
+ $this->assertTrue(is_a($campaigns, 'AWeberCollection'));
+ $this->assertEquals(count($this->adapter->requestsMade), 1);
+ $this->assertEquals($this->adapter->requestsMade[0]['uri'],
+ '/accounts/1/lists/303449/campaigns');
+ }
+
+ /**
+ * When accessing non-implemented children of a resource, should raised
+ * a not implemented exception
+ */
+ public function testShouldThrowExceptionIfNotImplemented() {
+ $this->adapter->clearRequests();
+ $this->setExpectedException('AWeberResourceNotImplemented');
+ $obj = $this->entry->something_not_implemented;
+ $this->assertEquals(count($this->adapter->requestsMade), 0);
+ }
+
+ /**
+ * Should return the name of all attributes and collections in this entry
+ */
+ public function testAttrs() {
+ $this->assertEquals($this->entry->attrs(),
+ array(
+ 'id' => 303449,
+ 'name' => 'default303449',
+ 'self_link' => 'https://api.aweber.com/1.0/accounts/1/lists/303449',
+ 'campaigns' => 'collection',
+ 'subscribers' => 'collection',
+ 'web_forms' => 'collection',
+ 'custom_fields' => 'collection',
+ 'web_form_split_tests' => 'collection',
+ )
+ );
+ }
+
+ /**
+ * Should be able to delete an entry, and it will send a DELETE request to the
+ * API servers to its URL
+ */
+ public function testDelete() {
+ $this->adapter->clearRequests();
+ $resp = $this->entry->delete();
+ $this->assertSame($resp, true);
+ $this->assertEquals(sizeOf($this->adapter->requestsMade), 1);
+ $this->assertEquals($this->adapter->requestsMade[0]['method'], 'DELETE');
+ $this->assertEquals($this->adapter->requestsMade[0]['uri'], $this->entry->url);
+ $this->assertEmpty($this->adapter->requestsMade[0]['headers'], "Delete request shouldn't have a Content-Type header");
+ }
+
+ /**
+ * When delete returns a non-200 status code, the delete failed and false is
+ * returned.
+ */
+ public function testFailedDelete() {
+ $url = '/accounts/1';
+ $data = $this->adapter->request('GET', $url);
+ $entry = new AWeberEntry($data, $url, $this->adapter);
+
+ $this->setExpectedException('AWeberAPIException', 'Simulated Exception');
+ $entry->delete();
+ }
+
+ /**
+ * Should be able to change a property in an entry's data array directly on
+ * the object, and have that change propogate to its data array
+ *
+ */
+ public function testSet() {
+ $this->assertNotEquals($this->entry->name, 'mynewlistname');
+ $this->assertNotEquals($this->entry->data['name'], 'mynewlistname');
+ $this->entry->name = 'mynewlistname';
+ $this->assertEquals($this->entry->name, 'mynewlistname');
+ $this->assertEquals($this->entry->data['name'], 'mynewlistname');
+ }
+
+ /**
+ * Should Color a request when a save is made.
+ */
+ public function testSave() {
+ $this->entry->name = 'mynewlistname';
+ $this->adapter->clearRequests();
+ $resp = $this->entry->save();
+ $this->assertEquals(sizeOf($this->adapter->requestsMade), 1);
+ $req = $this->adapter->requestsMade[0];
+ $this->assertEquals($req['method'], 'PATCH');
+ $this->assertEquals($req['uri'], $this->entry->url);
+ $this->assertEquals($req['data'], array('name' => 'mynewlistname'));
+ $this->assertEquals(array('Content-Type: application/json'), $req['headers'], "Save request should have a Content-Type header");
+ $this->assertSame($resp, true);
+ }
+
+ public function testSaveFailed() {
+ $url = '/accounts/1/lists/505454';
+ $data = $this->adapter->request('GET', $url);
+ $entry = new AWeberEntry($data, $url, $this->adapter);
+ $entry->name = 'foobarbaz';
+ $this->setExpectedException('AWeberAPIException', 'Simulated Exception');
+ $resp = $entry->save();
+ }
+
+ /**
+ * Should keep track of whether or not this entry is "dirty". It should
+ * not issue save calls if it hasn't been altered since the last successful
+ * load / save operation.
+ */
+ public function testShouldMaintainDirtiness() {
+ $this->adapter->clearRequests();
+ $resp = $this->entry->save();
+ $this->assertEquals(sizeOf($this->adapter->requestsMade), 0);
+ $this->entry->name = 'mynewlistname';
+ $resp = $this->entry->save();
+ $this->assertEquals(sizeOf($this->adapter->requestsMade), 1);
+ $resp = $this->entry->save();
+ $this->assertEquals(sizeOf($this->adapter->requestsMade), 1);
+ }
+
+
+}
+
+abstract class AccountTestCase extends PHPUnit_Framework_TestCase {
+
+ public function setUp() {
+ $this->adapter = get_mock_adapter();
+ $url = '/accounts/1';
+ $data = $this->adapter->request('GET', $url);
+ $this->entry = new AWeberEntry($data, $url, $this->adapter);
+ }
+}
+
+/**
+ * TestAWeberAccountEntry
+ *
+ * Account entries have a handful of special named operations. This asserts
+ * that they behave as expected.
+ *
+ * @uses PHPUnit_Framework_TestCase
+ * @package
+ * @version $id$
+ */
+class TestAWeberAccountEntry extends AccountTestCase {
+
+ public function testIsAccount() {
+ $this->assertEquals($this->entry->type, 'account');
+ }
+}
+
+class TestAccountGetWebForms extends AccountTestCase {
+
+ public function setUp() {
+ parent::setUp();
+ $this->forms = $this->entry->getWebForms();
+ }
+
+ public function testShouldReturnArray() {
+ $this->assertTrue(is_array($this->forms));
+ }
+
+ public function testShouldHaveCorrectCountOfEntries() {
+ $this->assertEquals(sizeOf($this->forms), 181);
+ }
+
+ public function testShouldHaveEntries() {
+ foreach($this->forms as $entry) {
+ $this->assertTrue(is_a($entry, 'AWeberEntry'));
+ }
+ }
+
+ public function testShouldHaveFullURL() {
+ foreach($this->forms as $entry) {
+ $this->assertEquals(preg_match('/^\/accounts\/1\/lists\/[0-9]*\/web_forms\/[0-9]*$/', $entry->url), 1);
+ }
+ }
+}
+
+class TestAccountGetWebFormSplitTests extends AccountTestCase {
+
+ public function setUp() {
+ parent::setUp();
+ $this->forms = $this->entry->getWebFormSplitTests();
+ }
+
+ public function testShouldReturnArray() {
+ $this->assertTrue(is_array($this->forms));
+ }
+
+ public function testShouldHaveCorrectCountOfEntries() {
+ $this->assertEquals(sizeOf($this->forms), 10);
+ }
+
+ public function testShouldHaveEntries() {
+ foreach($this->forms as $entry) {
+ $this->assertTrue(is_a($entry, 'AWeberEntry'));
+ }
+ }
+
+ public function testShouldHaveFullURL() {
+ foreach($this->forms as $entry) {
+ $this->assertEquals(preg_match('/^\/accounts\/1\/lists\/[0-9]*\/web_form_split_tests\/[0-9]*$/', $entry->url), 1);
+ }
+ }
+}
+
+class TestAccountFindSubscribers extends AccountTestCase {
+
+ public function testShouldSupportFindSubscribersMethod() {
+ $subscribers = $this->entry->findSubscribers(array('email' => 'joe@example.com'));
+ $this->assertTrue(is_a($subscribers, 'AWeberCollection'));
+ $this->assertEquals(count($subscribers), 1);
+ $this->assertEquals($subscribers->data['entries'][0]['self_link'],
+ 'https://api.aweber.com/1.0/accounts/1/lists/303449/subscribers/1');
+ }
+
+ /**
+ * Test to ensure that the nested objects, such as "custom_fields", are formatted correctly for GET request. The
+ * nested objects should be a JSON encoded string.
+ */
+ public function testShouldFormatFindSubscribersParameters() {
+
+ $findSubscribersParameters = array('email' => 'joe@example.com', 'custom_fields' => array('test' => 'test'));
+ $expectedFindSubscribersUri = '/accounts/1?custom_fields=%7B%22test%22%3A%22test%22%7D&email=joe%40example.com&ws.op=findSubscribers';
+
+ $subscribers = $this->entry->findSubscribers($findSubscribersParameters);
+
+ $req = $this->adapter->requestsMade[1];
+ $this->assertEquals($req['method'], 'GET');
+ $this->assertEquals($expectedFindSubscribersUri, $req['uri'],"Request data should be formatted properly.");
+
+ }
+
+}
+
+class TestAWeberSubscriberEntry extends PHPUnit_Framework_TestCase {
+
+ public function setUp() {
+ $this->adapter = get_mock_adapter();
+ $url = '/accounts/1/lists/303449/subscribers/1';
+ $data = $this->adapter->request('GET', $url);
+ $this->entry = new AWeberEntry($data, $url, $this->adapter);
+ }
+
+ public function testIsSubscriber() {
+ $this->assertEquals($this->entry->type, 'subscriber');
+ }
+
+ public function testHasCustomFields() {
+ $fields = $this->entry->custom_fields;
+ $this->assertFalse(empty($fields));
+ }
+
+ public function testCanReadCustomFields() {
+ $this->assertEquals($this->entry->custom_fields['Color'], 'blue');
+ $this->assertEquals($this->entry->custom_fields['Walruses'], '32');
+ }
+
+ public function testCanUpdateCustomFields() {
+ $this->entry->custom_fields['Color'] = 'Jeep';
+ $this->entry->custom_fields['Walruses'] = 'Cherokee';
+ $this->assertEquals($this->entry->custom_fields['Color'], 'Jeep');
+ }
+
+ public function testCanViewSizeOfCustomFields() {
+ $this->assertEquals(sizeOf($this->entry->custom_fields), 6);
+ }
+
+ public function testCanIterateOverCustomFields() {
+ $count = 0;
+ foreach ($this->entry->custom_fields as $field => $value) {
+ $count++;
+ }
+ $this->assertEquals($count, sizeOf($this->entry->custom_fields));
+ }
+
+ public function testShouldBeUpdatable() {
+ $this->adapter->clearRequests();
+ $this->entry->custom_fields['Color'] = 'Jeep';
+ $this->entry->save();
+ $data = $this->adapter->requestsMade[0]['data'];
+ $this->assertEquals($data['custom_fields']['Color'], 'Jeep');
+ }
+
+ public function testShouldSupportGetActivity() {
+ $activity = $this->entry->getActivity();
+ $this->assertTrue(is_a($activity, 'AWeberCollection'));
+ $this->assertEquals($activity->total_size, 1);
+ }
+}
+
+class TestAWeberMoveEntry extends PHPUnit_Framework_TestCase {
+
+ public function setUp() {
+ $this->adapter = get_mock_adapter();
+
+ # Get Subscriber
+ $url = '/accounts/1/lists/303449/subscribers/1';
+ $data = $this->adapter->request('GET', $url);
+ $this->subscriber = new AWeberEntry($data, $url, $this->adapter);
+
+ $url = '/accounts/1/lists/303449/subscribers/2';
+ $data = $this->adapter->request('GET', $url);
+ $this->unsubscribed = new AWeberEntry($data, $url, $this->adapter);
+
+ # Different List
+ $url = '/accounts/1/lists/505454';
+ $data = $this->adapter->request('GET', $url);
+ $this->different_list = new AWeberEntry($data, $url, $this->adapter);
+ }
+
+ /**
+ * Move Succeeded
+ */
+ public function testMove_Success() {
+
+ $this->adapter->clearRequests();
+ $resp = $this->subscriber->move($this->different_list);
+
+ $this->assertEquals(sizeOf($this->adapter->requestsMade), 2);
+
+ $req = $this->adapter->requestsMade[0];
+ $this->assertEquals($req['method'], 'POST');
+ $this->assertEquals($req['uri'], '/accounts/1/lists/303449/subscribers/1?list_link=https%3A%2F%2Fapi.aweber.com%2F1.0%2Faccounts%2F1%2Flists%2F505454&ws.op=move');
+ $this->assertEquals($req['data'], array(
+ 'ws.op' => 'move',
+ 'list_link' => $this->different_list->self_link));
+ $this->assertEmpty($req['headers'], "Move request shouldn't have a Content-Type header");
+
+ $req = $this->adapter->requestsMade[1];
+ $this->assertEquals($req['method'], 'GET');
+ $this->assertEquals($req['uri'], '/accounts/1/lists/505454/subscribers/3');
+ }
+
+ /**
+ * Move Failed
+ */
+ public function testMove_Failure() {
+
+ $this->adapter->clearRequests();
+ $this->setExpectedException('AWeberAPIException', 'Simulated Exception');
+ $this->unsubscribed->move($this->different_list);
+ $this->assertEquals(sizeOf($this->adapter->requestsMade), 1);
+
+ $req = $this->adapter->requestsMade[0];
+ $this->assertEquals($req['method'], 'POST');
+ $this->assertEquals($req['uri'], $this->unsubscribed->url);
+ $this->assertEquals($req['data'], array(
+ 'ws.op' => 'move',
+ 'list_link' => $this->different_list->self_link));
+ return;
+ }
+
+ /**
+ * Move with LastMessageSentNumber Succeeded
+ */
+ public function testMoveWLastMessageNumberSent_Success() {
+ $this->last_followup_message_number_sent = 1;
+
+ $this->adapter->clearRequests();
+ $resp = $this->subscriber->move($this->different_list, $this->last_followup_message_number_sent);
+
+ $this->assertEquals(sizeOf($this->adapter->requestsMade), 2);
+
+ $req = $this->adapter->requestsMade[0];
+ $this->assertEquals($req['method'], 'POST');
+ $this->assertEquals($req['uri'], '/accounts/1/lists/303449/subscribers/1?last_followup_message_number_sent=1&list_link=https%3A%2F%2Fapi.aweber.com%2F1.0%2Faccounts%2F1%2Flists%2F505454&ws.op=move');
+ $this->assertEquals($req['data'], array(
+ 'ws.op' => 'move',
+ 'list_link' => $this->different_list->self_link,
+ 'last_followup_message_number_sent' => $this->last_followup_message_number_sent));
+ $this->assertEmpty($req['headers'], "Move request shouldn't have a Content-Type header");
+
+ $req = $this->adapter->requestsMade[1];
+ $this->assertEquals($req['method'], 'GET');
+ $this->assertEquals($req['uri'], '/accounts/1/lists/505454/subscribers/3');
+ }
+
+}
+
+class TestGettingEntryParentEntry extends PHPUnit_Framework_TestCase {
+
+ public function setUp() {
+ $this->adapter = get_mock_adapter();
+ $url = '/accounts/1/lists/303449';
+ $data = $this->adapter->request('GET', $url);
+ $this->list = new AWeberEntry($data, $url, $this->adapter);
+ $url = '/accounts/1';
+ $data = $this->adapter->request('GET', $url);
+ $this->account = new AWeberEntry($data, $url, $this->adapter);
+ $url = '/accounts/1/lists/303449/custom_fields/1';
+ $data = $this->adapter->request('GET', $url);
+ $this->customField = new AWeberEntry($data, $url, $this->adapter);
+ }
+
+ public function testListParentShouldBeAccount() {
+ $entry = $this->list->getParentEntry();
+ $this->assertTrue(is_a($entry, 'AWeberEntry'));
+ $this->assertEquals($entry->type, 'account');
+ }
+
+ public function testCustomFieldParentShouldBeList() {
+ $entry = $this->customField->getParentEntry();
+ $this->assertTrue(is_a($entry, 'AWeberEntry'));
+ $this->assertEquals($entry->type, 'list');
+ }
+
+ public function testAccountParentShouldBeNULL() {
+ $entry = $this->account->getParentEntry();
+ $this->assertEquals($entry, NULL);
+ }
+}
diff --git a/tests/MultiVersionTest.php b/tests/MultiVersionTest.php
new file mode 100644
index 0000000..a4c9ef2
--- /dev/null
+++ b/tests/MultiVersionTest.php
@@ -0,0 +1,35 @@
+ $type, 'msg' => $msg));
+}
+
+
+class TestMultipleInstalledVersions extends PHPUnit_Framework_TestCase {
+
+ public function setUp() {
+ global $errors;
+ $errors = array();
+ }
+
+ /**
+ * tests that multiple includes would raise a E_USER_WARNING
+ */
+ public function test_multiple_includes() {
+ global $errors;
+ set_error_handler("myErrorHandler");
+ include("aweber_api/aweber_api.php");
+ restore_error_handler();
+
+ $this->assertEquals(count($errors), 1);
+ $this->assertEquals($errors[0]['type'], E_USER_WARNING);
+ $this->assertEquals($errors[0]['msg'], 'Duplicate: Another AWeberAPI client library is already in scope.');
+ }
+}
+?>
diff --git a/tests/OAuthApplicationTest.php b/tests/OAuthApplicationTest.php
new file mode 100644
index 0000000..b62bef0
--- /dev/null
+++ b/tests/OAuthApplicationTest.php
@@ -0,0 +1,504 @@
+signatureBase = $sigBase;
+ switch ($this->signatureMethod) {
+ case 'HMAC-SHA1':
+ default:
+ return base64_encode(hash_hmac('sha1', $sigBase, $sigKey, true));
+ }
+ }
+}
+
+class TestOAuthApplication extends PHPUnit_Framework_TestCase {
+
+ public $stubrsp =
+ "HTTP/1.1 200 Ok\r\nDate: Fri, 20 Dec 2013 21:23:38 GMT\r\nContent-Type: application/json\r\n\r\n{data:fake}";
+
+ public function setUp() {
+ $parentApp = false;
+ $this->oauth = new OAuthApplication($parentApp);
+ $this->oauth->consumerSecret = 'CONSUMERSECRET';
+ $this->oauth->consumerKey = 'consumer_key';
+ }
+
+ /**
+ * testUniqueNonce
+ *
+ * GenerateNonce should generate a unique string
+ * @access public
+ * @return void
+ */
+ public function testUniqueNonce() {
+ $values = array();
+ foreach (range(1,100) as $i) {
+ $val = $this->oauth->generateNonce();
+ $this->assertFalse(in_array($val, $values), 'Generated nonce should be unique');
+ $values[] = $val;
+ }
+ }
+
+ public function testAddGetParams() {
+ $url = 'http://www.sometestsite.com/';
+ $data = array(
+ 'keyA' => 'Some Value',
+ 'keyC' => 'some other value',
+ 'keyB' => 'yet another value',
+ );
+
+ $this->assertEquals(
+ 'keyA=Some%20Value&keyB=yet%20another%20value&keyC=some%20other%20value',
+ $this->oauth->buildData($data));
+ }
+
+ /**
+ * testUniqueNonceSameTime
+ *
+ * GenerateNonce should generate unique strings, even with the same timestamp
+ * @access public
+ * @return void
+ */
+ public function testUniqueNonceSameTime() {
+ $time = time();
+ $values = array();
+ foreach (range(1,100) as $i) {
+ $val = $this->oauth->generateNonce($time);
+ $this->assertFalse(in_array($val, $values), 'Generated nonce should be unique,'.
+ ' even with identical timestamp');
+ $values[] = $val;
+ }
+ }
+
+ /**
+ * generateTimestamp
+ *
+ * Ensure generateTimestamp returns a time in epoch seconds.
+ * @access public
+ * @return void
+ */
+ public function testGenerateTimestamp() {
+ $time = $this->oauth->generateTimestamp();
+ $this->assertTrue(is_int($time), 'Timestamp must be an integer');
+ $this->assertTrue($time > 0, 'Timestamp must be positive.');
+ $this->assertTrue($this->oauth->generateTimestamp() >= $time,
+ 'Multiple calls to generateTimestamp should always be equal or greater.');
+ }
+
+ /**
+ * testCreateSignature
+ *
+ * Test that a new signature is generated based on the data
+ * @access public
+ * @return void
+ */
+ public function testCreateSignature() {
+ $sigBase = '342refd435gdfxw354xfbw364fdg'; // Random string
+ $sigKey = 'gdgdfet4gdffgd4etgr'; // Random string as well
+ $signature = $this->oauth->createSignature($sigBase, $sigKey);
+ $this->assertNotEmpty($signature, 'Returns a valid signature');
+ $this->assertTrue(strpos($signature, $sigBase) === false, 'Signature does not contain base');
+ $this->assertTrue(strpos($signature, $sigKey) === false, 'Signature does not contain key');
+ }
+
+ /**
+ * testCreateSignatureUniqueness
+ *
+ * Verify that signatures are unique
+ * @access public
+ * @return void
+ */
+ public function testCreateSignatureUniqueness() {
+ $sigBase = '342refd435gdfxw354xfbw364fdg'; // Random string
+ $sigKey = 'gdgdfet4gdffgd4etgr'; // Random string as well
+ $signature = $this->oauth->createSignature($sigBase, $sigKey);
+ $signature2 = $this->oauth->createSignature($sigBase, $sigKey);
+ $this->assertEquals($signature, $signature2, 'Signatures with same parameters are identical.');
+ $sigKey = $sigKey.'1';
+
+ $sig3 = $this->oauth->createSignature($sigBase, $sigKey);
+ $this->assertNotEquals($signature, $sig3, 'Changing key creates different signature');
+ }
+
+
+ /**
+ * testGetVersion
+ *
+ * Tests that the default OAuth version is currently 1.0
+ * @access public
+ * @return void
+ */
+ public function testGetVersion() {
+ $version = $this->oauth->oAuthVersion;
+ $this->assertEquals($version, '1.0', 'Default version is 1.0');
+ }
+
+ /**
+ * testOAuthUser
+ *
+ * Tests the the OAuthUser class exists and has all its necessary data
+ * @access public
+ * @return void
+ */
+ public function testOAuthUser() {
+ $user = new OAuthUser();
+
+ $this->assertFalse($user->requestToken);
+ $this->assertFalse($user->tokenSecret);
+ $this->assertFalse($user->authorizedToken);
+ $this->assertFalse($user->accessToken);
+ }
+
+ /**
+ * generateOAuthUser
+ *
+ * Generate a mock OAuth user
+ *
+ * @access protected
+ * @return void
+ */
+ protected function generateOAuthUser() {
+ $data = array(
+ 'token' => 'authorized token',
+ 'secret' => 'abcdefg',
+ );
+
+ $user = new OAuthUser();
+ $user->accessToken = $data['token'];
+ $user->tokenSecret = $data['secret'];
+
+ return array($user, $data);
+ }
+
+ /**
+ * testCreatSignatureKey
+ *
+ * Test that signature key is generated correctly
+ * @access public
+ * @return void
+ */
+ public function testCreatSignatureKey() {
+ list($user, $data) = $this->generateOAuthUser();
+ $this->oauth->user = $user;
+
+ $sigKey = $this->oauth->createSignatureKey();
+ $this->assertEquals('CONSUMERSECRET&abcdefg', $sigKey); //, 'Signature key generated matches');
+ }
+
+ /**
+ * testGetOAuthRequestData
+ *
+ * @access public
+ * @return void
+ */
+ public function testGetOAuthRequestData() {
+ $this->oauth->user = new OAuthUser();
+ $data = $this->oauth->getOAuthRequestData();
+ $tempData = array(
+ 'oauth_consumer_key' => 'consumer_key',
+ 'oauth_token' => '',
+ 'oauth_signature_method' => 'HMAC-SHA1',
+ 'oauth_version' => '1.0');
+
+ // Check that timestamp and nonce are set.
+ $this->assertTrue(!empty($data['oauth_timestamp']));
+ $this->assertTrue(!empty($data['oauth_nonce']));
+
+ // Remove those two items, since they are always unique
+ unset($data['oauth_timestamp']);
+ unset($data['oauth_nonce']);
+
+ ksort($data);
+ ksort($tempData);
+
+ $this->assertSame($data, $tempData, 'Aside from timestamp and nonce, the rest should be identical');
+ }
+
+ public function generateRequestData() {
+ list($user, $data) = $this->generateOAuthUser();
+ $this->oauth->user = $user;
+
+ $requestData = array(
+ 'key1' => 'value1',
+ 'key2' => 'value2',
+ 'key3' => 'value3');
+
+ $mergeData = $this->oauth->mergeOAuthData($requestData);
+ return array($mergeData, $requestData);
+ }
+
+ public function testMergeOAuthData() {
+ list($mergeData, $requestData) = $this->generateRequestData();
+ $this->assertEquals($mergeData['key1'], $requestData['key1']);
+ $this->assertEquals($mergeData['oauth_consumer_key'], $this->oauth->consumerKey);
+ }
+
+ public function testCreateSignatureBase() {
+ list($mergeData, $requestData) = $this->generateRequestData();
+ $method = 'GET';
+ $url = 'http://www.someservice.com/chicken-nuggets';
+
+ $baseString = $this->oauth->createSignatureBase($method, $url, $mergeData);
+ $this->assertNotEmpty($baseString);
+ $this->assertTrue(strpos($baseString, $method) !== false);
+ $this->assertTrue(strpos($baseString, urlencode($url))!== false);
+ }
+
+ /**
+ * testCreateSignatureBaseEscapeParamWithPlus
+ *
+ * Test that reserved characters escaped in the URL query params are preserved
+ * correctly in the signature base. In this case, a %2B (plus) should be
+ * converted into a %252B in the signature base.
+ *
+ * @access public
+ * @return void
+ */
+ public function testCreateSignatureBaseEscapeParamWithPlus() {
+ list($mergeData, $requestData) = $this->generateRequestData();
+ $method = 'GET';
+ $url = 'http://www.somewhere.com/chicken?email=iluvchkn%2B10@somewhere.com';
+ $encodedPlus = '%252B';
+
+ $baseString = $this->oauth->createSignatureBase($method, $url, $mergeData);
+ $this->assertTrue(strpos($baseString, $encodedPlus)!==FALSE);
+ }
+
+ public function testSignRequest() {
+ list($data, $requestData) = $this->generateRequestData();
+ $method = 'GET';
+ $url = 'http://www.someservice.com/chicken-nuggets';
+
+ $signedData = $this->oauth->signRequest($method, $url, $data);
+ foreach ($data as $key => $val) {
+ $this->assertEquals($signedData[$key], $val, 'Signed data has correct value for "'.$key.'"');
+ }
+
+ $this->assertTrue(!empty($signedData['oauth_signature']));
+ }
+
+ /**
+ * testPrepareRequest
+ *
+ * @access public
+ * @return void
+ */
+ public function testPrepareRequest() {
+ list($data, $requestData) = $this->generateRequestData();
+ $method = 'GET';
+ $url = 'http://www.someservice.com/chicken-nuggets';
+
+ $signedData = $this->oauth->prepareRequest($method, $url, $requestData);
+
+ // Test that a nonce and timestamp was generated, then remove the one from our base data so that we
+ // don't try to compare the two. They should still be different.
+ $this->assertTrue(!empty($signedData['oauth_nonce']), 'Verify nonce was generated');
+ $this->assertTrue(!empty($signedData['oauth_timestamp']), 'Verify nonce was generated');
+ unset($data['oauth_nonce']);
+ unset($data['oauth_timestamp']);
+
+ foreach ($data as $key => $val) {
+ $this->assertEquals($signedData[$key], $val, 'Signed data has correct value for "'.$key.'"');
+ }
+
+ $this->assertTrue(!empty($signedData['oauth_signature']));
+ }
+
+ /**
+ * testParseResponse
+ *
+ * @access public
+ * @return void
+ */
+ public function testParseResponse() {
+ $response = new Object();
+ $response->body = 'oauth_token=oTkBjHdPYyP7j13RffGpllNhktOR775h6jk48D1cu8Y&oauth_token_secret=GRRa1E7MMm526nql1hETKHMu2BvAXpvHaCu332TPAJ4&oauth_callback_confirmed=true';
+ $data = $this->oauth->parseResponse($response);
+ $dataShouldBe = array(
+ 'oauth_token' => 'oTkBjHdPYyP7j13RffGpllNhktOR775h6jk48D1cu8Y',
+ 'oauth_token_secret' => 'GRRa1E7MMm526nql1hETKHMu2BvAXpvHaCu332TPAJ4',
+ 'oauth_callback_confirmed' => 'true',
+ );
+ $this->assertSame($data, $dataShouldBe, 'Data is parsed correctly.');
+ }
+
+ public function testRequestReturnValueIsZeroNotInJSONFormat(){
+ $this->adapter = get_mock_adapter();
+ $url = '/accounts/1/lists/303449/subscribers?email=someone%40example.com&ws.show=total_size';
+ $data = $this->adapter->request('GET', $url);
+ $this->assertTrue(isset($data));
+ $this->assertEquals($data,0);
+ }
+
+ public function testMakeRequestGet() {
+ $stub = $this->getMock('CurlObject');
+ $stub->expects($this->any())
+ ->method('execute')
+ ->will($this->returnValue($this->stubrsp));
+ $this->oauth->curl = $stub;
+ $rsp = $this->oauth->makeRequest("GET",
+ 'http://www.example.com/fakeresource');
+ $this->assertEquals($rsp, "{data:fake}");
+ }
+
+ public function testMakeRequestPost() {
+ $stub = $this->getMock('CurlObject');
+ $stub->expects($this->any())
+ ->method('execute')
+ ->will($this->returnValue($this->stubrsp));
+ $this->oauth->curl = $stub;
+ $rsp = $this->oauth->makeRequest("POST",
+ 'http://www.example.com/fakeresource');
+ $this->assertEquals($rsp, "{data:fake}");
+ }
+
+ public function testMakeRequestPut() {
+ $stub = $this->getMock('CurlObject');
+ $stub->expects($this->any())
+ ->method('execute')
+ ->will($this->returnValue($this->stubrsp));
+ $this->oauth->curl = $stub;
+ $rsp = $this->oauth->makeRequest("PATCH",
+ 'http://www.example.com/fakeresource');
+ $this->assertEquals($rsp, "{data:fake}");
+ }
+
+ public function testMakeRequestDelete() {
+ $stub = $this->getMock('CurlObject');
+ $stub->expects($this->any())
+ ->method('execute')
+ ->will($this->returnValue($this->stubrsp));
+ $this->oauth->curl = $stub;
+ $rsp = $this->oauth->makeRequest("DELETE",
+ 'http://www.example.com/fakeresource');
+ $this->assertEquals($rsp, "{data:fake}");
+ }
+
+ /**
+ * testMakeRequestContainsReservedCharInUrl
+ *
+ * Test request behavior as it relates to reserved chars in URL.
+ *
+ * This test verifies that escaped characters in the URL query
+ * params are handled correctly when generating the oauth
+ * signature base. For this specific test, an escaped plus
+ * sign needs to show up as %252B in the signature, not as
+ * %25252B
+ *
+ * @access public
+ * @return void
+ */
+ public function testMakeRequestContainsReservedCharInUrl() {
+ $parentApp = false;
+ $patchedoauth = new PatchedOAuthApplication($parentApp);
+ $patchedoauth->consumerSecret = 'CONSUMERSECRET';
+ $patchedoauth->consumerKey = 'consumer_key';
+
+ $stub = $this->getMock('CurlObject');
+ $stub->expects($this->any())
+ ->method('execute')
+ ->will($this->returnValue($this->stubrsp));
+ $patchedoauth->curl = $stub;
+ $rsp = $patchedoauth->makeRequest("GET",
+ 'http://www.example.com/fake?email=noone%2B@sp.com');
+ $this->assertRegExp('/.+(\%252B).+/', $patchedoauth->signatureBase);
+ }
+
+ /**
+ * testMakeRequestContainsSeperatorInUrl
+ *
+ * Test request behavior as it relates to separaters in URL.
+ *
+ * This test verifies that a non-seperator equals sign in the URL
+ * query params is handled correctly when generating the oauth
+ * signature base. For this specific test, an escaped equals
+ * character needs to show up as %253D in the signature, not as
+ * %25253D
+ *
+ * @access public
+ * @return void
+ */
+ public function testMakeRequestContainsSeparatorInUrl() {
+ $parentApp = false;
+ $patchedoauth = new PatchedOAuthApplication($parentApp);
+ $patchedoauth->consumerSecret = 'CONSUMERSECRET';
+ $patchedoauth->consumerKey = 'consumer_key';
+
+ $stub = $this->getMock('CurlObject');
+ $stub->expects($this->any())
+ ->method('execute')
+ ->will($this->returnValue($this->stubrsp));
+ $patchedoauth->curl = $stub;
+ $rsp = $patchedoauth->makeRequest("GET",
+ 'http://www.example.com/fake?email=noone%3D@sp.com');
+ $this->assertRegExp('/.+(\%253D).+/', $patchedoauth->signatureBase);
+ }
+
+ /**
+ * testMakeRequestContainsReservedCharInData
+ *
+ * Test request behavior as it relates to reserved chars in data.
+ *
+ * This test verifies that reserved characters in the data array
+ * are handled correctly when generating the oauth signature base.
+ * For this specific test, a plus sign needs to show up as %252B
+ * in the signature, not as + or %25252B
+ *
+ * @access public
+ * @return void
+ */
+ public function testMakeRequestContainsReservedCharInData() {
+ $parentApp = false;
+ $patchedoauth = new PatchedOAuthApplication($parentApp);
+ $patchedoauth->consumerSecret = 'CONSUMERSECRET';
+ $patchedoauth->consumerKey = 'consumer_key';
+
+ $stub = $this->getMock('CurlObject');
+ $stub->expects($this->any())
+ ->method('execute')
+ ->will($this->returnValue($this->stubrsp));
+ $patchedoauth->curl = $stub;
+ $rsp = $patchedoauth->makeRequest("GET", 'http://www.example.com/fake',
+ array('email' => 'noone+1@sp.com'));
+ $this->assertRegExp('/.+(\%252B).+/', $patchedoauth->signatureBase);
+ }
+
+ /**
+ * testMakeRequestContainsSeperatorInData
+ *
+ * Test request behavior as it relates to separators in data array.
+ *
+ * This test verifies that a non-separator equals sign in the data
+ * array is handled correctly when generating the oauth signature base.
+ * For this specific test, an equals sign needs to show up as %253D
+ * in the signature, not as %25253D
+ *
+ * @access public
+ * @return void
+ */
+ public function testMakeRequestContainsSeparatorInData() {
+ $parentApp = false;
+ $patchedoauth = new PatchedOAuthApplication($parentApp);
+ $patchedoauth->consumerSecret = 'CONSUMERSECRET';
+ $patchedoauth->consumerKey = 'consumer_key';
+
+ $stub = $this->getMock('CurlObject');
+ $stub->expects($this->any())
+ ->method('execute')
+ ->will($this->returnValue($this->stubrsp));
+ $patchedoauth->curl = $stub;
+ $rsp = $patchedoauth->makeRequest("GET", 'http://www.example.com/fake',
+ array('email' => 'noone=1@sp.com'));
+ $this->assertRegExp('/.+(\%253D).+/', $patchedoauth->signatureBase);
+ }
+}
diff --git a/tests/all_tests.php b/tests/all_tests.php
deleted file mode 100644
index 94b132a..0000000
--- a/tests/all_tests.php
+++ /dev/null
@@ -1,20 +0,0 @@
-addTestCase(new TestAWeberAPI());
-$test->addTestCase(new OAuthAppliationTest());
-$test->addTestCase(new TestAWeberCollection());
-$test->addTestCase(new TestAWeberEntry());
-$test->addTestCase(new TestAWeberAccountEntry());
-$test->addTestCase(new TestAWeberSubscriberEntry());
-$test->run(new TextReporter());
-
-?>
diff --git a/tests/aweber_api_test.php b/tests/aweber_api_test.php
deleted file mode 100644
index de53745..0000000
--- a/tests/aweber_api_test.php
+++ /dev/null
@@ -1,93 +0,0 @@
-adapter = new MockOAuthAdapter();
- $this->app = array(
- 'key' => 'RogsGzUw3QAK6cPSI24u',
- 'secret' => '1eaHAFJnEklS8qSBvitvSO6OCkaU4QyHU3AOE1rw',
- );
- $this->aweber = new AWeberAPI($this->app['key'],
- $this->app['secret']);
-
- $this->user = array(
- 'token' => 'lc0UcVJdlpNyVVMLzeZWZZGb61pEnlhBdHGg9usF',
- 'secret' => 'VMus5FW1TyX7N24xaOyc0VsylGBHC6rAomq3LM67',
- );
-
- }
-
- /**
- * App keys given at construction should be maintained internally
- */
- public function test_should_contain_app_keys() {
- $this->assertEqual($this->aweber->consumerKey,
- $this->app['key']);
- $this->assertEqual($this->aweber->consumerSecret,
- $this->app['secret']);
-
- }
-
- /**
- * OAuther adapter object should be allowed to be switched out
- */
- public function test_should_allow_setting_oauth_adapter() {
- $this->aweber->setAdapter($this->adapter);
- $this->assertEqual($this->aweber->adapter, $this->adapter);
- }
-
- /**
- * When authorization fails, an exception is raised
- */
- public function test_should_raise_exception_if_auth_fails() {
- MockData::$oauth = false;
- $this->aweber->setAdapter($this->adapter);
- try {
- $account = $this->aweber->getAccount($this->user['token'],
- $this->user['secret']);
- $this->assertTrue(false, 'This should not run due to an exception');
- }
- catch (Exception $e) {
- $this->assertTrue(is_a($e, 'Exception'));
- }
- MockData::$oauth = true;
- }
-
- public function test_should_return_null_after_authorization() {
- $this->aweber->setAdapter($this->adapter);
- $account = $this->aweber->getAccount($this->user['token'],
- $this->user['secret']);
- $list = $account->lists->getById(123456);
- $this->assertTrue(empty($list));
- }
-
- /**
- * getAccount should load an AWeberEntry based on a single account
- * for the authorized user
- */
- public function test_getAccount() {
- $this->aweber->setAdapter($this->adapter);
- $account = $this->aweber->getAccount($this->user['token'],
- $this->user['secret']);
- $this->assertNotNull($account);
- $this->assertTrue(is_a($account, 'AWeberResponse'));
- $this->assertTrue(is_a($account, 'AWeberEntry'));
- }
-
- /**
- * Load from URL should take a relative URL and return the correct
- * object based on that request. Allows skipping around the tree
- * based on URLs, not just walking it.
- */
- public function test_loadFromUrl() {
- $this->aweber->setAdapter($this->adapter);
- $list = $this->aweber->loadFromUrl('/accounts/1/lists/303449');
-
- $this->assertTrue(is_a($list, 'AWeberEntry'));
- $this->assertEqual($list->type, 'list');
- $this->assertEqual($list->id, '303449');
- }
-
-}
-?>
diff --git a/tests/aweber_collection.test.php b/tests/aweber_collection.test.php
deleted file mode 100644
index 3c7613d..0000000
--- a/tests/aweber_collection.test.php
+++ /dev/null
@@ -1,127 +0,0 @@
-adapter = new MockOAuthAdapter();
- $this->collection = new AWeberCollection(MockData::load('lists'), '/accounts/1/lists', $this->adapter);
- }
-
- /**
- * Should have the total size available.
- */
- public function testShouldHaveTotalSize() {
- $this->assertEqual($this->collection->total_size, 24);
- }
-
- /**
- * Should have the URL used to generate this collection
- */
- public function testShouldHaveURL() {
- $this->assertEqual($this->collection->url, '/accounts/1/lists');
- }
-
- /**
- * Should not allow direct access to the entries data retreived from
- * the request.
- */
- public function testShouldNotAccessEntries() {
- $this->assertNull($this->collection->entries);
- }
-
- /**
- * Should allow entries to be accessed as an array
- */
- public function testShouldAccessEntiresAsArray() {
- $entry = $this->collection[0];
- $this->assertTrue(is_a($entry, 'AWeberResponse'));
- $this->assertTrue(is_a($entry, 'AWeberEntry'));
- $this->assertEqual($entry->id, 251847);
- }
-
- public function testShouldKnowItsCollectionType() {
- $this->assertEqual($this->collection->type, 'lists');
- }
-
- /**
- * When accessing an offset out of range, should return null
- */
- public function testShouldNotAccessEntriesOutOfRange() {
- $this->assertNull($this->collection[26]);
- }
-
- /**
- * When accessing entries by offset, should only make a request when
- * accessing entries not in currenlty loaded pages.
- */
- public function testShouldLazilyLoadAdditionalPages() {
- $this->adapter->clearRequests();
-
- $entry = $this->collection[19];
- $this->assertEqual($entry->id, 50000003);
- $this->assertTrue(empty($this->adapter->requestsMade));
-
- $entry = $this->collection[20];
- $this->assertEqual($entry->id, 50000002);
- $this->assertEqual(count($this->adapter->requestsMade), 1);
-
- $entry = $this->collection[21];
- $this->assertEqual($entry->id, 406860);
- $this->assertEqual(count($this->adapter->requestsMade), 1);
- }
-
- /**
- * Should implement the Iterator interface
- */
- public function testShouldBeAnIterator() {
- $this->assertTrue(is_a($this->collection, 'Iterator'));
- }
-
- /**
- * When accessed as an iterator, should return entries by offset,
- * from 0 to n-1.
- */
- public function testShouldAllowIteration() {
- $count = 0;
- foreach ($this->collection as $index => $entry) {
- $this->assertEqual($index, $count);
- $count++;
- }
- $this->assertEqual($count, $this->collection->total_size);
- }
-
- /**
- * getById - should return an AWeberEntry with the given id
- */
- public function testShouldAllowGetById() {
- $id = 303449;
- $name = 'default303449';
- $entry = $this->collection->getById($id);
-
- $this->assertEqual($entry->id, $id);
- $this->assertEqual($entry->name, $name);
- $this->assertTrue(is_a($entry, 'AWeberEntry'));
- $this->assertEqual(count($this->adapter->requestsMade), 1);
-
- $this->assertEqual($this->adapter->requestsMade[0]['uri'],
- '/accounts/1/lists/303449');
- }
-
- /**
- * Should implement the countable interface, allowing count() and sizeOf()
- * functions to work properly
- */
- public function testShouldAllowCountOperations() {
- $this->assertEqual(count($this->collection), $this->collection->total_size);
- $this->assertEqual(sizeOf($this->collection), $this->collection->total_size);
- }
-
-}
-
-
-
-?>
diff --git a/tests/aweber_entry.test.php b/tests/aweber_entry.test.php
deleted file mode 100644
index f4db6e6..0000000
--- a/tests/aweber_entry.test.php
+++ /dev/null
@@ -1,281 +0,0 @@
-adapter = new MockOAuthAdapter();
-
- $url = '/accounts/1/lists/303449';
- $data = $this->adapter->request('GET', $url);
- $this->entry = new AWeberEntry($data, $url, $this->adapter);
- }
-
- /**
- * Should be an AWeberEntry
- */
- public function testShouldBeAnAWeberEntry() {
- $this->assertTrue(is_a($this->entry, 'AWeberEntry'));
- }
-
- /**
- * AWeberEntry should be an AWeberResponse
- */
- public function testShouldBeAnAWeberResponse() {
- $this->assertTrue(is_a($this->entry, 'AWeberResponse'));
- }
-
- /**
- * Should be able to access the id property (global to all entries)
- */
- public function testShouldBeAbleToAccessId() {
- $this->assertEqual($this->entry->id, 303449);
- }
-
- /**
- * Should be able to access name (or any property unique to the response)
- */
- public function testShouldBeAbleToAccessName() {
- $this->assertEqual($this->entry->name, 'default303449');
- }
-
- /**
- * Should be able to discern its type based on its data
- */
- public function testShouldKnowItsType() {
- $this->assertEqual($this->entry->type, 'list');
- }
-
- /**
- * When access properties it does not have, but are known sub collections,
- * it will request for it and return the new collection object.
- */
- public function testShouldProvidedCollections() {
- $this->adapter->clearRequests();
- $campaigns = $this->entry->campaigns;
-
- $this->assertTrue(is_a($campaigns, 'AWeberCollection'));
- $this->assertEqual(count($this->adapter->requestsMade), 1);
- $this->assertEqual($this->adapter->requestsMade[0]['uri'],
- '/accounts/1/lists/303449/campaigns');
- }
-
- /**
- * When accessing non-implemented children of a resource, should raised
- * a not implemented exception
- */
- public function testShouldThrowExceptionIfNotImplemented() {
- $this->adapter->clearRequests();
- try {
- $obj = $this->entry->something_not_implemented;
- $this->assertFalse(true, "This should not get called due to exception raising.");
- }
- catch (Exception $e) {
- $this->assertTrue(is_a($e, 'AWeberException'));
- $this->assertTrue(is_a($e, 'AWeberResourceNotImplemented'));
- }
- $this->assertEqual(count($this->adapter->requestsMade), 0);
- }
-
- /**
- * Should return the name of all attributes and collections in this entry
- */
- public function testAttrs() {
- $this->assertEqual($this->entry->attrs(),
- array(
- 'id' => 303449,
- 'name' => 'default303449',
- 'campaigns' => 'collection',
- 'subscribers' => 'collection',
- 'web_forms' => 'collection',
- 'web_form_split_tests' => 'collection',
- )
- );
- }
-
- /**
- * Should be able to delete an entry, and it will send a DELETE request to the
- * API servers to its URL
- */
- public function testDelete() {
- $this->adapter->clearRequests();
- $resp = $this->entry->delete();
- $this->assertIdentical($resp, true);
- $this->assertEqual(sizeOf($this->adapter->requestsMade), 1);
- $this->assertEqual($this->adapter->requestsMade[0]['method'], 'DELETE');
- $this->assertEqual($this->adapter->requestsMade[0]['uri'], $this->entry->url);
- }
-
- /**
- * When delete returns a non-200 status code, the delete failed and false is
- * returned.
- */
- public function testFailedDelete() {
- $url = '/accounts/1';
- $data = $this->adapter->request('GET', $url);
- $entry = new AWeberEntry($data, $url, $this->adapter);
-
- // Can't delete account
- $resp = $entry->delete();
- $this->assertIdentical($resp, false);
- }
-
- /**
- * Should be able to change a property in an entry's data array directly on
- * the object, and have that change propogate to its data array
- *
- */
- public function testSet() {
- $this->assertNotEqual($this->entry->name, 'mynewlistname');
- $this->assertNotEqual($this->entry->data['name'], 'mynewlistname');
- $this->entry->name = 'mynewlistname';
- $this->assertEqual($this->entry->name, 'mynewlistname');
- $this->assertEqual($this->entry->data['name'], 'mynewlistname');
- }
-
- /**
- * Should make a request when a save is made.
- */
- public function testSave() {
- $this->entry->name = 'mynewlistname';
- $this->adapter->clearRequests();
- $resp = $this->entry->save();
- $this->assertEqual(sizeOf($this->adapter->requestsMade), 1);
- $req = $this->adapter->requestsMade[0];
- $this->assertEqual($req['method'], 'PATCH');
- $this->assertEqual($req['uri'], $this->entry->url);
- $this->assertEqual($req['data'], array('name' => 'mynewlistname'));
- $this->assertIdentical($resp, true);
- }
-
- public function testSaveFailed() {
- $url = '/accounts/1/lists/303450';
- $data = $this->adapter->request('GET', $url);
- $entry = new AWeberEntry($data, $url, $this->adapter);
- $entry->name = 'foobarbaz';
- $resp = $entry->save();
- $this->assertIdentical($resp, false);
- }
-
- /**
- * Should keep track of whether or not this entry is "dirty". It should
- * not make save calls if it hasn't been altered since the last successful
- * load / save operation.
- */
- public function testShouldMaintainDirtiness() {
- $this->adapter->clearRequests();
- $resp = $this->entry->save();
- $this->assertEqual(sizeOf($this->adapter->requestsMade), 0);
- $this->entry->name = 'mynewlistname';
- $resp = $this->entry->save();
- $this->assertEqual(sizeOf($this->adapter->requestsMade), 1);
- $resp = $this->entry->save();
- $this->assertEqual(sizeOf($this->adapter->requestsMade), 1);
- }
-
-
-}
-
-/**
- * TestAWeberAccountEntry
- *
- * Account entries have a handful of special named operations. This asserts
- * that they behave as expected.
- *
- * @uses UnitTestCase
- * @package
- * @version $id$
- */
-class TestAWeberAccountEntry extends UnitTestCase {
-
- public function setUp() {
- $this->adapter = new MockOAuthAdapter();
- $this->adapter->app = new AWeberServiceProvider();
- $url = '/accounts/1';
- $data = $this->adapter->request('GET', $url);
- $this->entry = new AWeberEntry($data, $url, $this->adapter);
- $this->data = $this->entry->getWebForms();
- }
-
- public function testIsAccount() {
- $this->assertEqual($this->entry->type, 'account');
- }
-
- public function testShouldReturnArray() {
- $this->assertTrue(is_array($this->data));
- }
-
- public function testShouldHaveCorrectCountOfEntries() {
- $this->assertEqual(sizeOf($this->data), 23);
- }
-
- public function testShouldHaveEntries() {
- foreach($this->data as $entry) {
- $this->assertTrue(is_a($entry, 'AWeberEntry'));
- }
- }
-
- public function testShouldHaveFullURL() {
- foreach($this->data as $entry) {
- $this->assertTrue(preg_match('/^\/accounts\/1\/lists\/[0-9]*\/web_forms\/[0-9]*$/', $entry->url));
- }
- }
-}
-
-class TestAWeberSubscriberEntry extends UnitTestCase {
-
- public function setUp() {
- $this->adapter = new MockOAuthAdapter();
- $this->adapter->app = new AWeberServiceProvider();
- $url = '/accounts/1/lists/1/subscribers/1';
- $data = $this->adapter->request('GET', $url);
- $this->entry = new AWeberEntry($data, $url, $this->adapter);
- }
-
- public function testIsSubscriber() {
- $this->assertEqual($this->entry->type, 'subscriber');
- }
-
- public function testHasCustomFields() {
- $fields = $this->entry->custom_fields;
- $this->assertFalse(empty($fields));
- }
-
- public function testCanReadCustomFields() {
- $this->assertEqual($this->entry->custom_fields['Make'], 'Honda');
- $this->assertEqual($this->entry->custom_fields['Model'], 'Civic');
- }
-
- public function testCanUpdateCustomFields() {
- $this->entry->custom_fields['Make'] = 'Jeep';
- $this->entry->custom_fields['Model'] = 'Cherokee';
- $this->assertEqual($this->entry->custom_fields['Make'], 'Jeep');
- }
-
- public function testCanViewSizeOfCustomFields() {
- $this->assertEqual(sizeOf($this->entry->custom_fields), 4);
- }
-
- public function testCanIterateOverCustomFields() {
- $count = 0;
- foreach ($this->entry->custom_fields as $field => $value) {
- $count++;
- }
- $this->assertEqual($count, sizeOf($this->entry->custom_fields));
- }
-
- public function testShouldBeUpdatable() {
- $this->adapter->clearRequests();
- $this->entry->custom_fields['Make'] = 'Jeep';
- $this->entry->save();
- $data = $this->adapter->requestsMade[0]['data'];
- $this->assertEqual($data['custom_fields']['Make'], 'Jeep');
- }
-
-
-}
-
diff --git a/tests/data/account.json b/tests/data/account.json
deleted file mode 100644
index 4782e1e..0000000
--- a/tests/data/account.json
+++ /dev/null
@@ -1 +0,0 @@
-{"http_etag": "\"5ae3075ce7c9b1869ce83bf2a7d67da376af0031-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "lists_collection_link": "https://api.aweber.com/1.0/accounts/326084/lists", "self_link": "https://api.aweber.com/1.0/accounts/326084", "resource_type_link": "https://api.aweber.com/1.0/#account", "id": 326084, "integrations_collection_link": "https://api.aweber.com/1.0/accounts/326084/integrations"}
diff --git a/tests/data/accounts.json b/tests/data/accounts.json
deleted file mode 100644
index 0e0edc4..0000000
--- a/tests/data/accounts.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{"total_size": 1, "start": 0, "next_collection_link":
-"http://api.apitest.lab:81/0.1/accounts?ws.start=20&ws.size=20", "entries":
-[{"http_etag":
-"\"c70dfb07dc67c9dd6a8bc01130acf68d1fbf035f-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"",
-"vendor_accounts_collection_link":
-"http://api.apitest.lab:81/0.1/accounts/910/vendor_accounts",
-"lists_collection_link": "http://api.apitest.lab:81/0.1/accounts/910/lists",
-"self_link": "http://api.apitest.lab:81/0.1/accounts/910",
-"resource_type_link": "http://api.apitest.lab:81/0.1/#account", "id": 910}], "resource_type_link" : "http://api.apitest.lab:81/0.1/#accounts"}
diff --git a/tests/data/accounts/1.json b/tests/data/accounts/1.json
new file mode 100644
index 0000000..0082f80
--- /dev/null
+++ b/tests/data/accounts/1.json
@@ -0,0 +1 @@
+{"http_etag": "\"356a192b7913b04c54574d18c28d46e6395428ab-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "lists_collection_link": "https://api.aweber.com/1.0/accounts/1/lists", "self_link": "https://api.aweber.com/1.0/accounts/1", "resource_type_link": "https://api.aweber.com/1.0/#account", "id": 1, "integrations_collection_link": "https://api.aweber.com/1.0/accounts/1/integrations"}
\ No newline at end of file
diff --git a/tests/data/accounts/findSubscribers.json b/tests/data/accounts/findSubscribers.json
new file mode 100644
index 0000000..cf80f2d
--- /dev/null
+++ b/tests/data/accounts/findSubscribers.json
@@ -0,0 +1 @@
+{"start": 0, "total_size_link": "https://api.aweber.com/1.0/accounts/1?email=joe%40example.com&ws.op=findSubscribers&ws.show=total_size", "entries": [{"subscription_url": "https://www.aweber.com/users/leads/add", "postal_code": "14450", "id": 52629234, "custom_fields": {"NewCustomField": "really awesome", "YourCustomField": "NewValue"}, "last_followup_sent_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/campaigns/f3548399", "city": "Fairport", "http_etag": "\"223a06015fdd0daaef1b561aee4f10176513e346-075619e34cfd24154382b5a53939132945e96ce3\"", "ad_tracking": "control panel", "dma_code": 538, "last_followup_message_number_sent": 3, "last_followup_sent_at": "2011-03-02 14:47:22.797206-05:00", "misc_notes": "", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/subscribers/1", "is_verified": true, "email": "joe@example.com", "status": "subscribed", "unsubscribed_at": null, "area_code": 585, "latitude": 43.100499999999997, "unsubscribe_method": null, "ip_address": "192.168.10.10", "name": "Joe User", "subscription_method": "signup form", "resource_type_link": "https://api.aweber.com/1.0/#subscriber", "region": "NY", "longitude": -77.426000000000002, "verified_at": "2011-02-15 13:37:23", "subscribed_at": "2011-02-15 13:27:28-05:00", "country": "United States"}]}
diff --git a/tests/data/accounts/findSubscribers_ts.json b/tests/data/accounts/findSubscribers_ts.json
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/data/accounts/findSubscribers_ts.json
@@ -0,0 +1 @@
+1
diff --git a/tests/data/accounts/page1.json b/tests/data/accounts/page1.json
new file mode 100644
index 0000000..9ded1aa
--- /dev/null
+++ b/tests/data/accounts/page1.json
@@ -0,0 +1 @@
+{"total_size": 1, "start": 0, "resource_type_link": "https://api.aweber.com/1.0/#accounts", "entries": [{"http_etag": "\"356a192b7913b04c54574d18c28d46e6395428ab-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "lists_collection_link": "https://api.aweber.com/1.0/accounts/1/lists", "self_link": "https://api.aweber.com/1.0/accounts/1", "resource_type_link": "https://api.aweber.com/1.0/#account", "id": 1, "integrations_collection_link": "https://api.aweber.com/1.0/accounts/1/integrations"}]}
\ No newline at end of file
diff --git a/tests/data/accounts/webFormSplitTests.json b/tests/data/accounts/webFormSplitTests.json
new file mode 100644
index 0000000..f362390
--- /dev/null
+++ b/tests/data/accounts/webFormSplitTests.json
@@ -0,0 +1 @@
+[{"javascript_source_link": "http://forms.aweber.com/form/40/split_1855537940.js", "name": "Split test test", "components_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1115098/web_form_split_tests/1855537940/components", "is_active": true, "http_etag": "\"b233a000ec4c29e928c514a253a15684a410fa4e-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1115098/web_form_split_tests/1855537940", "resource_type_link": "https://api.aweber.com/1.0/#web_form_split_test", "id": 1855537940}, {"javascript_source_link": "http://forms.aweber.com/form/13/split_1532806713.js", "name": "boristest", "components_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_form_split_tests/1532806713/components", "is_active": true, "http_etag": "\"84edfbf4844a7a322bc379038974c0ce9871c1cd-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_form_split_tests/1532806713", "resource_type_link": "https://api.aweber.com/1.0/#web_form_split_test", "id": 1532806713}, {"javascript_source_link": "http://forms.aweber.com/form/77/split_534926677.js", "name": "dsdf", "components_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_form_split_tests/534926677/components", "is_active": true, "http_etag": "\"3b72341343ae33364cbb88255b27faa0502eeaa4-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_form_split_tests/534926677", "resource_type_link": "https://api.aweber.com/1.0/#web_form_split_test", "id": 534926677}, {"javascript_source_link": "http://forms.aweber.com/form/75/split_728276575.js", "name": "Split test 1", "components_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/772516/web_form_split_tests/728276575/components", "is_active": true, "http_etag": "\"178f16c2c921b30ea27b1f367005873c6de01c3b-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/772516/web_form_split_tests/728276575", "resource_type_link": "https://api.aweber.com/1.0/#web_form_split_test", "id": 728276575}, {"javascript_source_link": "http://forms.aweber.com/form/48/split_1607797548.js", "name": "Split Test", "components_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/772516/web_form_split_tests/1607797548/components", "is_active": true, "http_etag": "\"67201f06d0d014c17dcde6b0a272535f6e569e79-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/772516/web_form_split_tests/1607797548", "resource_type_link": "https://api.aweber.com/1.0/#web_form_split_test", "id": 1607797548}, {"javascript_source_link": "http://forms.aweber.com/form/26/split_1252500526.js", "name": "Default", "components_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_form_split_tests/1252500526/components", "is_active": true, "http_etag": "\"3516cfad8b8d86f837c3c96a80537437fd774423-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_form_split_tests/1252500526", "resource_type_link": "https://api.aweber.com/1.0/#web_form_split_test", "id": 1252500526}, {"javascript_source_link": "http://forms.aweber.com/form/35/split_917592535.js", "name": "sdfsdf", "components_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/web_form_split_tests/917592535/components", "is_active": true, "http_etag": "\"aa9292397447f3a0a75a377c258112d8c0533f2f-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/web_form_split_tests/917592535", "resource_type_link": "https://api.aweber.com/1.0/#web_form_split_test", "id": 917592535}, {"javascript_source_link": "http://forms.aweber.com/form/44/split_1012223044.js", "name": "My splittest", "components_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_form_split_tests/1012223044/components", "is_active": true, "http_etag": "\"a69aca22c1f557260d2e977974400ded9830d288-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_form_split_tests/1012223044", "resource_type_link": "https://api.aweber.com/1.0/#web_form_split_test", "id": 1012223044}, {"javascript_source_link": "http://forms.aweber.com/form/72/split_1470252472.js", "name": "Split Test", "components_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_form_split_tests/1470252472/components", "is_active": true, "http_etag": "\"32123e40a437467f56cbc2d937196af63521b106-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_form_split_tests/1470252472", "resource_type_link": "https://api.aweber.com/1.0/#web_form_split_test", "id": 1470252472}, {"javascript_source_link": "http://forms.aweber.com/form/63/split_612763163.js", "name": "Popover/Inline Split", "components_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_form_split_tests/612763163/components", "is_active": true, "http_etag": "\"527d810ab00669964ab634395cded77c12af7a9c-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_form_split_tests/612763163", "resource_type_link": "https://api.aweber.com/1.0/#web_form_split_test", "id": 612763163}]
diff --git a/tests/data/accounts/webForms.json b/tests/data/accounts/webForms.json
new file mode 100644
index 0000000..fe2b354
--- /dev/null
+++ b/tests/data/accounts/webForms.json
@@ -0,0 +1 @@
+[{"conversion_percentage": 50.0, "unique_conversion_percentage": 100.0, "name": "My Web Form", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 1, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1694928/web_forms/2144687381", "http_etag": "\"51be85d7b77486eb3a5dc2c3f63d09a012a33926-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 2, "type": "styled", "id": 2144687381}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1424745/web_forms/973076791", "http_etag": "\"0e82edd46ca9875726804d94453ede91f6744bbd-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "styled", "id": 973076791}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Gray Chicklet", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/web_forms/568620", "http_etag": "\"2b308ba9dff0d01fd6a06ae5e52b9c11ba520f39-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "popover", "id": 568620}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "New Form 285188834", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/web_forms/285188834", "http_etag": "\"a085ac40b9623b018feecd53b139c50dbf01273d-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 285188834}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "No name", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/web_forms/855354709", "http_etag": "\"95152961c46929db4ec7b4d0255dd3307f57ae2b-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 855354709}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "No name", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/web_forms/934237153", "http_etag": "\"99e202c1f0a8f788a9f721ce50e64ec4d75ee100-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 934237153}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "No name", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/web_forms/976364442", "http_etag": "\"42b90e264d78ef869caa3dfb8749e5c59829fa74-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 976364442}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "No name", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/web_forms/1264487494", "http_etag": "\"24ccbe40ec8662d44a50d32016bfe82d9f083efa-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 1264487494}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Gray Chicklet", "total_unique_displays": 5, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/web_forms/1462846225", "http_etag": "\"43f4a8a0acba4d5cb29cdbef880208ef1d49e7eb-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 11, "type": "popover", "id": 1462846225}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "No name", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/web_forms/1468487959", "http_etag": "\"6ad3154c3a4c9e482b3bd0501c7add80e44a67fc-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 1468487959}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "No name", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/web_forms/1711941830", "http_etag": "\"3f03507b50cadc29e8fd8688f0ccfb321b848f7c-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 1711941830}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "No name", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/web_forms/1744135098", "http_etag": "\"b89e8365f2071a8d6377bf574064629999c88ffe-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 1744135098}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "No name", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/web_forms/1814628241", "http_etag": "\"988a78522511150ab99b27337b2f16e1254948c0-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 1814628241}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "No name", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/web_forms/1857915969", "http_etag": "\"353329e0cf32e566d5d0afe326b292c8be355445-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 1857915969}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Powered by form.", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1348696/web_forms/1366711934", "http_etag": "\"c48fdfe8e3d6368e350e5c987e1efb40c790f502-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "styled", "id": 1366711934}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "schnazzy!", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1196881/web_forms/473922196", "http_etag": "\"8834f0be4c6c74d50149dab04c5ba5eb14022865-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 473922196}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Pasta Marco Email Newsletter", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1183956/web_forms/1018037681", "http_etag": "\"42cf0269831bb5d0dce403fef1d10c11dbcc4c4f-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1018037681}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1182241/web_forms/785375409", "http_etag": "\"5b4471873fe7aba40bdb8b8fec13ce542c845def-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 785375409}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 4", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1115098/web_forms/1788673120", "http_etag": "\"288e20fb5d8c8976fa611835a9d76a6ec42aa13f-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1788673120}, {"conversion_percentage": 200.0, "unique_conversion_percentage": 200.0, "name": "Musical Form", "total_unique_displays": 2, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 4, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1115098/web_forms/2065783495", "http_etag": "\"84ce57743da233d23be8c9caab68d2731ffeb6a1-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 2, "type": "styled", "id": 2065783495}, {"conversion_percentage": 17.142857142857142, "unique_conversion_percentage": 92.307692307692307, "name": "My Web Form", "total_unique_displays": 13, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 12, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1115098/web_forms/1864285919", "http_etag": "\"8db2aeff14913fa247c03c4116cc23b3f40cacfd-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 70, "type": "styled", "id": 1864285919}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 3", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1115098/web_forms/1757005029", "http_etag": "\"00dd6eac3d88fd75e7d501168c00ba5c0a02777c-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1757005029}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1111742/web_forms/10301239", "http_etag": "\"ef222211d3f7ae8721156ae961851322ee1e8513-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 10301239}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Break it", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1111742/web_forms/77889986", "http_etag": "\"7d38647664420bcbd2e8bce394d6c72bbe06407a-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 77889986}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Archive Link Test", "total_unique_displays": 6, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_forms/443852033", "http_etag": "\"e3348e5c31160f2beaa1c80fec8d83f8dce8af60-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 8, "type": "styled", "id": 443852033}, {"conversion_percentage": 60.0, "unique_conversion_percentage": 75.0, "name": "My Child Form", "total_unique_displays": 4, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 3, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_forms/443345799", "http_etag": "\"4890501b056cfc914de815b747f8118243ff5ddc-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 5, "type": "styled", "id": 443345799}, {"conversion_percentage": 9.0909090909090917, "unique_conversion_percentage": 12.5, "name": "My Parent Form", "total_unique_displays": 8, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 1, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_forms/373395245", "http_etag": "\"3f587348fdc61e30f9a23bb279d3a1ae4ca25e86-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 11, "type": "styled", "id": 373395245}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 10", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_forms/328144509", "http_etag": "\"f96fea01b595a370fb0d570e7258948fcd07fac1-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "styled", "id": 328144509}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 9, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_forms/321196417", "http_etag": "\"499663dbd0e5ed40fb85b8326e793e63f5e27004-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 16, "type": "styled", "id": 321196417}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 2", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_forms/1722348849", "http_etag": "\"18fa000c3f56edc9ed5015b0d49ce7808b60cdd0-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1722348849}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 4", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_forms/1671541208", "http_etag": "\"2540db27ff371fd077b4b857fe84f3ed9be1b412-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1671541208}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 8", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_forms/1412438117", "http_etag": "\"19d23a82f864c6b6a1217e3f542db0d948edecb9-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1412438117}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 7", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_forms/1194725294", "http_etag": "\"1ab43dcf494d60a4df4df3b8f71c72cd11028c2f-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "styled", "id": 1194725294}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 10", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_forms/888558240", "http_etag": "\"bcad5e2525fe6d4920a0c29c4860f85df7848d1e-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 888558240}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 5", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_forms/612488428", "http_etag": "\"154deedf37af57c9c3b69617a0f55df42dd3799e-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 612488428}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 3", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_forms/596395782", "http_etag": "\"6f185c76b236366b494201ca6c311b69cb2abee5-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 2, "type": "styled", "id": 596395782}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 6", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_forms/5432097", "http_etag": "\"e1d9a53731237d367e916fd02ca52f272f585468-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 5432097}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 9", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_forms/52577210", "http_etag": "\"65fbdeba9c2ff7433b612c5453a350e4ff7c9adb-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 52577210}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 10", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1108070/web_forms/180387219", "http_etag": "\"5b6421896e5eb441b4872ccef1334482e40e72ef-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 180387219}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 80, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1095782/web_forms/1131664280", "http_etag": "\"8dbfa1b2af790cab7624be54cd266e928c30bde0-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 80, "type": "styled", "id": 1131664280}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 2", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1095782/web_forms/1661398130", "http_etag": "\"556986c22e508739394965abd76250a6b3df947b-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "styled", "id": 1661398130}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 2, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1072793/web_forms/1641279744", "http_etag": "\"b52a6bdbcf30b4a545fac08ca8560f7d99c4d4bc-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 2, "type": "styled", "id": 1641279744}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1054014/web_forms/231994029", "http_etag": "\"a0172692184320c2cbd4ff72a9a4e487ea383c62-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 231994029}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "legacy form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1054014/web_forms/562064899", "http_etag": "\"1c811aa0623413179239fbc9de98616d3609be6f-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 562064899}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1046404/web_forms/496819835", "http_etag": "\"fb3b65ae7c76fc45228d2a81d4b6947ec40ab8c5-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "styled", "id": 496819835}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": null, "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/964600/web_forms/5519300", "http_etag": "\"aa48417c41d1e7be17a42ce51d5938731c72b0c0-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 5519300}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": null, "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/964600/web_forms/73641902", "http_etag": "\"7eecaa30a6053e077c6c1826e6511a5c92032e02-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 73641902}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Legacy Form Backup", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/964600/web_forms/302910027", "http_etag": "\"c9571c60fd36b7074ce4bcde7742409f37284055-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "popup", "id": 302910027}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Legacy Form Backup Backup", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/964600/web_forms/387792437", "http_etag": "\"850db01ebc1293291a0a67028c320a955046bd2b-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "popup", "id": 387792437}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": null, "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/964600/web_forms/593064148", "http_etag": "\"433f04376492b78dc70b0fa2dcf80962ce4ba6e4-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 593064148}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "New Form 627390460", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/964600/web_forms/627390460", "http_etag": "\"2fd9aff7b96ca46c052e32158bddfb7b5d588b9e-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 627390460}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": null, "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/964600/web_forms/968066808", "http_etag": "\"13fc8fe97cf9cedab7e1e7b77a202e8383c8a2ba-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 968066808}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 2", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/964600/web_forms/1023998893", "http_etag": "\"d046fe1331102a3558398ae3c5f98dbf13a01cd4-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1023998893}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Legacy Form Backup", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/964600/web_forms/1170809790", "http_etag": "\"dc108596d4582ba8309d8ef4fc8405e0199c85bb-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1170809790}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Legacy Form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/964600/web_forms/1529784343", "http_etag": "\"f970afd79c9442dc0879b0a87bc7f7fe0058bd72-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1529784343}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/964600/web_forms/1860899944", "http_etag": "\"5183c37a84b6ba1e29477c22b16d4f8359da7af7-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1860899944}, {"conversion_percentage": 2.1459227467811157, "unique_conversion_percentage": 5.4945054945054945, "name": "Template Test-Suite", "total_unique_displays": 91, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 5, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/964600/web_forms/2051923412", "http_etag": "\"ca8c6849fcb786a6f05d2111f4a8dbf8642dd944-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 233, "type": "styled", "id": 2051923412}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/955380/web_forms/82242439", "http_etag": "\"0f60646aff234b5ec8f0e3fdd792476e885908ca-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 82242439}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": null, "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/955380/web_forms/724627", "http_etag": "\"bdb5ae4d0e0bfb6ef8c253f7cef7b9bb1abe1f3c-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 724627}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": null, "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/955380/web_forms/587198783", "http_etag": "\"681134ebbd0912ebafc57126c78dd964a4d56125-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 587198783}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": null, "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/955380/web_forms/1617266080", "http_etag": "\"e6e3b97b7785439f60411f7461b1a2889db1cc24-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1617266080}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/942197/web_forms/1163987878", "http_etag": "\"2980675adbcbcd672fd280d6fd05f23623bfa63a-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1163987878}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "New Form 542539955", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/910041/web_forms/542539955", "http_etag": "\"676a6ebc322f40c810f97b8352d6466535ac057d-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 542539955}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "New Form 257213584", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/257213584", "http_etag": "\"747b22256c036faebdd02f958bef2ff3ff8fb83e-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 257213584}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 10", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/357037756", "http_etag": "\"827c8d4bb584291f9f11058c578ed807ac9156dc-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 357037756}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 3", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/400478268", "http_etag": "\"54e36cc52f8010cea33dc75a62dc563229c89827-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 400478268}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "make it rain", "total_unique_displays": 29, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/508718125", "http_etag": "\"2c5aefc3d8d01f39e6a3baab3a7785a7042e867b-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 29, "type": "styled", "id": 508718125}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 6", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/689069504", "http_etag": "\"15a5ed08906a5cb727b69e49580ff2057d512d15-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 689069504}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "New Form 691528162", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/691528162", "http_etag": "\"714aaccc3411c474a171c4fe5e7606ec2dc11bc3-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 691528162}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "New Form 699871790", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/699871790", "http_etag": "\"35710365e496c5d4426f016e9ccf6ef42d245e10-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 699871790}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "New Form 748189901", "total_unique_displays": 7, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/748189901", "http_etag": "\"0b7bbdb9bde8ccfc28fd98848714a023761f64da-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 21, "type": "styled", "id": 748189901}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "bobs form", "total_unique_displays": 11, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/894036012", "http_etag": "\"77e86e5863f9119c72ed3af7967c92ff7f37bf3e-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 122, "type": "styled", "id": 894036012}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 5", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/1276182016", "http_etag": "\"ea9cf905e5f8b7dac791daf1ab2a707ceb4466f4-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1276182016}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 4", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/1288238087", "http_etag": "\"e334666d7fd23428442fda765c497aa9d35fc5f1-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 4, "type": "styled", "id": 1288238087}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 6sdafas", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/1437665117", "http_etag": "\"d6e57f5621fdaa1ae98468320dc3f16c03893145-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1437665117}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/1457026934", "http_etag": "\"87c8c668744826e68cb3c028a36d24944b9f635f-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1457026934}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 8", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/1531760318", "http_etag": "\"29d28dc30b201895beac81321ceae9b46ce388dd-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1531760318}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "New Form 1595765870", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/1595765870", "http_etag": "\"a0699a235db9cffeb796dd12240a36d0c7ebbd94-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1595765870}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 10", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/1842848697", "http_etag": "\"8dafd61b38bc24f55dba2a1278507ece17fcadab-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "styled", "id": 1842848697}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "testPreview", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/1853297168", "http_etag": "\"9aed1ef77223300ad4cc722ef2154b856d8d7917-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1853297168}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "New Form 1861519652", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/1861519652", "http_etag": "\"eb3dd259cf4859f85b917fcd77499f34d3299550-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "styled", "id": 1861519652}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": null, "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/1898374275", "http_etag": "\"10975370ab291307ea2448ffb2dcb348427dba90-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1898374275}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 2", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/1906787848", "http_etag": "\"82380044d5196a56e38a1fbd66f598fbec0dc7f3-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1906787848}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 7", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/2067391571", "http_etag": "\"750d5f8b28d3a1b55aff90c9493d49fe33bfbbc7-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 2067391571}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "New Form 2107913849", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 1, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/900776/web_forms/2107913849", "http_etag": "\"b074b956a1b5c53c32987de9b5019d14314a0779-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 2107913849}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "my form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/878564/web_forms/851265514", "http_etag": "\"d19ba57bc9d865dcc33c541c4d4cb2770734c900-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 851265514}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "my form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/878564/web_forms/1141219796", "http_etag": "\"b150d0c0bdab6cfb026f3c13defd05b7fc23b33d-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1141219796}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "foobar", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/878564/web_forms/1966182491", "http_etag": "\"1187e370af50fe9cd20185467ad641f62e831557-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1966182491}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "foobar Backup", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/878564/web_forms/2018090923", "http_etag": "\"ebb84c017a46c29b232e67fb066ec758007b9732-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "popup", "id": 2018090923}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Green Test Form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/878564/web_forms/2047149891", "http_etag": "\"c00d650d89cbeb6d41743871ab2e97eb814dad6c-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 2047149891}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "fug testing", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/823131/web_forms/332065738", "http_etag": "\"301f32f63bfee00f23bec5654d2276adb476567c-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "inline", "id": 332065738}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "No name", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/823123/web_forms/2116787913", "http_etag": "\"386078a203d4fa3703a1cc89fc58851b3c521b44-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 2116787913}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "fug testing", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/823119/web_forms/507248900", "http_etag": "\"e89c96894f627a53709fb3737fb315297b109145-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 507248900}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "fug testing", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/823118/web_forms/1350820648", "http_etag": "\"4a06eb62ade5c8d033f25ab8f8f41f725956b32a-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 1350820648}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "fug testing", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/823112/web_forms/1448685995", "http_etag": "\"9784fcd2ca5688e6a01cbd5e53e276485632a7f2-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 1448685995}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 2", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/808784/web_forms/676161441", "http_etag": "\"4bb89cc242764e2e2e349c65817010af42f766c5-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 676161441}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/808784/web_forms/1867865991", "http_etag": "\"72820806d8c09b2b422b6d0befbfd656ea930468-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "styled", "id": 1867865991}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "test webform", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/808115/web_forms/159068296", "http_etag": "\"6efc88cc8c361b96302bc78962c7d5125ae68860-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 159068296}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "test webform", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/808108/web_forms/511191625", "http_etag": "\"ebeb6c885a61041a63114f40499c7dcca7613efc-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 511191625}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Original Legacy Form", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/800953/web_forms/1036959601", "http_etag": "\"ddadd210cf3084cb94397df01a8b5154e2d2eaa8-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 11, "type": "lightbox", "id": 1036959601}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Legacy Form Upgraded", "total_unique_displays": 3, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/800953/web_forms/1963249447", "http_etag": "\"4c2ec6baae3b3b2001fc0bc69b80cf08716776c3-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 14, "type": "styled", "id": 1963249447}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Legacy Form Manually Corrected", "total_unique_displays": 3, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/800953/web_forms/1971575092", "http_etag": "\"7bb9be77ce645de9c18603120e0fdab59483a2b7-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 16, "type": "styled", "id": 1971575092}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "No name", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/784481/web_forms/1947156267", "http_etag": "\"697940ccd24b035c748b16a07a2f497a445bcfbd-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1947156267}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "test WF", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/779069/web_forms/45835009", "http_etag": "\"a9027d07999bc8d350a0b0445d74eb7dca1f3087-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "inline", "id": 45835009}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/779069/web_forms/170475442", "http_etag": "\"f5a5c7dfb9f4c40cd0e4f31028f6286a967a8793-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 170475442}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": null, "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/779069/web_forms/1873861809", "http_etag": "\"b05aebe1c77e313b802a7a72dea4ef10b1a99b69-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1873861809}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "asdf", "total_unique_displays": 2, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/772516/web_forms/347588065", "http_etag": "\"f9247bb31da775793fa02fbda06a581d0d4867db-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 3, "type": "styled", "id": 347588065}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Test", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/772516/web_forms/809624501", "http_etag": "\"b6392dc21b1fdf05314ddb8bcd73a0fda1261c39-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "lightbox", "id": 809624501}, {"conversion_percentage": 33.333333333333336, "unique_conversion_percentage": 100.0, "name": "No name", "total_unique_displays": 2, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 2, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/772516/web_forms/965010836", "http_etag": "\"789f3178f8c6c53cb740ad1513362f4ae9121c82-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 6, "type": "inline", "id": 965010836}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "No name", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/772516/web_forms/1881580465", "http_etag": "\"430f381402cf43d9713a94569d7bd628bc639900-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 1881580465}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "blank form", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/771506/web_forms/348189412", "http_etag": "\"bc717b77dc727ad07d062fefb097310d46624e1e-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 6, "type": "styled", "id": 348189412}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Basic Blue", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/770825/web_forms/1905753533", "http_etag": "\"e136db41d3979245208bb3a9190df713fd3a94eb-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1905753533}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "my form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/770663/web_forms/892847888", "http_etag": "\"c21643f4205d0b7ccf19856698dd7f596b06b4de-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "popover", "id": 892847888}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "asdfasdfasdf", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/759844/web_forms/1634379617", "http_etag": "\"3ef2b680996eee89fb124b72a11a7b5ec179b05c-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 1634379617}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "No name", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/745346/web_forms/1355512330", "http_etag": "\"33ce7a5a93ae01cfb3bab274d15d4ab9586d503c-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 1355512330}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "BuckForm", "total_unique_displays": 3, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/726604/web_forms/129150770", "http_etag": "\"c4e771b9c731cc7fe96a885f098f2babd07fb2b0-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 3, "type": "styled", "id": 129150770}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Test Form Pop-over", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/726604/web_forms/244808226", "http_etag": "\"9cd06fce487d66079a29d0ab9b0933ae99dc9d60-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "popover", "id": 244808226}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Test Form Lightbox", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/726604/web_forms/599599630", "http_etag": "\"e210d12f66ff1f4054730e6f8a8d32ffc53ec791-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "lightbox", "id": 599599630}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Test Form in-Line", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/726604/web_forms/941072015", "http_etag": "\"f3ff01cbaf709af60034c220caec07259b2495c6-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 941072015}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Test Form Pop-up", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/726604/web_forms/1197965158", "http_etag": "\"3040656b7ebb09ebb0b3dfaecbc63cecaf8f61d3-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "popup", "id": 1197965158}, {"conversion_percentage": 181.81818181818181, "unique_conversion_percentage": 500.0, "name": "Test", "total_unique_displays": 4, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 20, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/724283/web_forms/2132673208", "http_etag": "\"2865cc41208c645c092def7f4b66198ad318d471-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 11, "type": "inline", "id": 2132673208}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "asdfsdf", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/702861/web_forms/566873591", "http_etag": "\"b743e7f1ee262682df8e964a59629ed1a49dabeb-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 566873591}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Unique Display Test", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/694079/web_forms/858281535", "http_etag": "\"952ed00ff7c8e881112a7020756e0965a63c3e80-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 29, "type": "inline", "id": 858281535}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Unique Display Test 2", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/694079/web_forms/1042012891", "http_etag": "\"b8800085d83e6ae0e977bb14775bca9c6f396682-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "inline", "id": 1042012891}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Pop Over", "total_unique_displays": 2, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/694079/web_forms/1191578413", "http_etag": "\"203340cbd71e53bb7e3008237d4225e8efbb6bb6-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 3, "type": "popover", "id": 1191578413}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "No name", "total_unique_displays": 3, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/694079/web_forms/1217730325", "http_etag": "\"9fe092f1a19002b793f7dbb59aa86ddeb9ef9d00-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 4, "type": "lightbox", "id": 1217730325}, {"conversion_percentage": 9.0909090909090917, "unique_conversion_percentage": 200.0, "name": "My Homepage Form", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 2, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/694079/web_forms/1868326525", "http_etag": "\"50147fd094bb1d44d65629c5cc15403aa14b7839-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 22, "type": "inline", "id": 1868326525}, {"conversion_percentage": 50.0, "unique_conversion_percentage": 133.33333333333334, "name": "Test", "total_unique_displays": 9, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 12, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/660719/web_forms/402369361", "http_etag": "\"e2c71e4ae648e0ce3155f5d14271cf620b68a44a-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 24, "type": "inline", "id": 402369361}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "DonkeyNews", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/565324/web_forms/1764155127", "http_etag": "\"8678cd52a779bd1d40fb73bc0fd12a460363ceba-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1764155127}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "test form preview", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/565324/web_forms/2049171912", "http_etag": "\"238b79a4cd7e44b3ee9a32907a2418aeeec4c397-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "lightbox", "id": 2049171912}, {"conversion_percentage": 200.0, "unique_conversion_percentage": 200.0, "name": "My Web Form", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 2, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/480650/web_forms/119940622", "http_etag": "\"37995d85ec1de48a1750f683991157bbd5bca79d-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "styled", "id": 119940622}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Jeff Form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/385081/web_forms/532991540", "http_etag": "\"c04ba8dece428df59ff3a068983a503f115ac4fa-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "popover", "id": 532991540}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Web Form Pop-over Slide Top", "total_unique_displays": 4, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_forms/76455409", "http_etag": "\"6fd18ad018087d4ae916d285fa1f3993f161db64-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 12, "type": "popover", "id": 76455409}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Web Form Exit Pop-up", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_forms/189792168", "http_etag": "\"e9ba1dbdb9d954736cfb4013f8303ce899480592-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "exitpopup", "id": 189792168}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "new form555", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_forms/583286931", "http_etag": "\"722a29bbc87313b8d6a19974a78aa6e2ec529263-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 583286931}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Web Form Inline", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_forms/667692730", "http_etag": "\"e83dcc8db81b7969c80299e6fc10c6fcb8aa11b7-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 4, "type": "inline", "id": 667692730}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "new form555", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_forms/686888629", "http_etag": "\"d842c1ab0719cd2471acbe2a4314877bcb6bf595-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 686888629}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Web Form Pop-up", "total_unique_displays": 2, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_forms/928196725", "http_etag": "\"1ef0d2dad8640ba7e7908dadd8dfeb044e734ea7-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 11, "type": "popup", "id": 928196725}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "new form555", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_forms/954331622", "http_etag": "\"c1b8ad8c63cbe5d4945849594c877b49a2a5b110-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 954331622}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "new form555", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_forms/971982735", "http_etag": "\"41b121aed9cd74bafc11f2987cded6a8c7c8bfbb-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 971982735}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Web Form Pop-over Pop", "total_unique_displays": 2, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_forms/1170541731", "http_etag": "\"55734955aad86bd99fd1d5c12f6a4695cb5fcfbf-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 24, "type": "popover", "id": 1170541731}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Web Form Pop-under", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_forms/1288554194", "http_etag": "\"b99d5a5b09e2f5323a5732ab7d960163f840033f-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 5, "type": "popunder", "id": 1288554194}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "new form555", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_forms/1652536477", "http_etag": "\"7889ac919a1c1b449a5bfad675353ef5b9d6a855-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 1652536477}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Web Form Pop-over Slide Left", "total_unique_displays": 5, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_forms/1770309189", "http_etag": "\"db01cd46be00bc149c4f89f2bc11aa4e8f3966bb-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 16, "type": "popover", "id": 1770309189}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "new form555", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_forms/2008449116", "http_etag": "\"328804463b0810cc7417156ad8166f17023e03bd-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 2008449116}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Web Form Pop-over Fade", "total_unique_displays": 4, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/226186/web_forms/2135024251", "http_etag": "\"957b4bc0a9880932e0cf014fa7c3c07a6360250d-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 9, "type": "popover", "id": 2135024251}, {"conversion_percentage": 4.2553191489361701, "unique_conversion_percentage": 66.666666666666671, "name": "Tom's Form", "total_unique_displays": 3, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 2, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1/web_forms/585613330", "http_etag": "\"0c42e3d0fe9212482f6c94c65c66c56f6ed6934e-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 47, "type": "styled", "id": 585613330}, {"conversion_percentage": 1.9230769230769231, "unique_conversion_percentage": 2.2222222222222223, "name": "Test Blog Subscriber Form Backup", "total_unique_displays": 45, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 1, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1/web_forms/605946693", "http_etag": "\"dfe03cb014315b1566b89e944f6373158da7004e-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 52, "type": "inline", "id": 605946693}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1/web_forms/694992833", "http_etag": "\"a2fbae430508601a559025cc79f5c2f18f10efc8-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 694992833}, {"conversion_percentage": 1.2820512820512822, "unique_conversion_percentage": 4.0816326530612246, "name": "Test Blog Subscriber Form", "total_unique_displays": 49, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 2, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1/web_forms/736998890", "http_etag": "\"61d90b4154d2f68bd4be44bfebcb0b9b999f32a9-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 156, "type": "styled", "id": 736998890}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 2", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1/web_forms/1588279671", "http_etag": "\"1e7eae8a399ebeffeccdb98dba74c5cf67ae3b87-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1588279671}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "test", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/320972/web_forms/293943", "http_etag": "\"584bee990092c9f819279178aff904647e137455-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "popup", "id": 293943}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "No name", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/320972/web_forms/400702746", "http_etag": "\"1e86361303464a7f5b4545c18bee759e3b791fd1-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "inline", "id": 400702746}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "aweberrdb form", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/385835/web_forms/1083972136", "http_etag": "\"e17ff3aec6197e19d7923fc25ab97c1b6c17f7ee-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "popover", "id": 1083972136}, {"conversion_percentage": 16.666666666666668, "unique_conversion_percentage": 50.0, "name": "Pop-over", "total_unique_displays": 2, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 1, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/385834/web_forms/224832412", "http_etag": "\"05baaf169d94747e620118394e215f375abed729-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 6, "type": "popover", "id": 224832412}, {"conversion_percentage": 16.666666666666668, "unique_conversion_percentage": 100.0, "name": "Pop-up", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 1, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/385834/web_forms/521818981", "http_etag": "\"05c7b2fc3c6d2ada26ddec1b74cc5959c3a3036b-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 6, "type": "popup", "id": 521818981}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Bite Me", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/385837/web_forms/97718346", "http_etag": "\"b6b47c8182f15c97fa686df109839dde9d9b54b0-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 97718346}, {"conversion_percentage": 250.0, "unique_conversion_percentage": 250.0, "name": "My Web Form2", "total_unique_displays": 2, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 5, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/web_forms/909085126", "http_etag": "\"b8371416aae5af865c7da9954d69e2aaae4df2b4-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 2, "type": "styled", "id": 909085126}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "test_lb", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/web_forms/634275", "http_etag": "\"32d1c3aa21d7173910f4164ecb68aa03a2a6b9c4-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "lightbox", "id": 634275}, {"conversion_percentage": 250.0, "unique_conversion_percentage": 250.0, "name": "My Web Form", "total_unique_displays": 2, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 5, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/web_forms/1618399024", "http_etag": "\"7b3321ecf419e04e65c935981e82c038142cafe7-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 2, "type": "styled", "id": 1618399024}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "sdfgsdfgsdfgsdfg", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/web_forms/1739189983", "http_etag": "\"35154bc8fbaac55c33bbe63ceacdb43299e911c9-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 1739189983}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "test_lb", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/web_forms/1749436464", "http_etag": "\"93a493fe6ab0b4e773a10c9c681f9bf7d23814f4-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "lightbox", "id": 1749436464}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 3", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/web_forms/1167592969", "http_etag": "\"de51ce5f38b0e4231e2c574a9f7be77050beab65-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1167592969}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My First Form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 1, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/327293/web_forms/2074646586", "http_etag": "\"399cc498f917fbda4d38a33adc7c311aea2373a0-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 2074646586}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Stage 2 Web Form", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/1507672263", "http_etag": "\"d9378933b5b5cc9c30e6ac8605397c95dcb79015-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1507672263}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 3", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/1911952229", "http_etag": "\"740e66434631228ac7e9ec39e518f0b78615b6eb-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "styled", "id": 1911952229}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Exit Popup - display every visit", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/132181207", "http_etag": "\"277bd4a125e5df089f770a2990090ef075be9851-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "exitpopup", "id": 132181207}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Test Light", "total_unique_displays": 13, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/208918171", "http_etag": "\"0847e45063225af0afdf9db639dad1ce55f45172-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 34, "type": "lightbox", "id": 208918171}, {"conversion_percentage": 2.8571428571428572, "unique_conversion_percentage": 14.285714285714286, "name": "In-Line Test", "total_unique_displays": 7, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 1, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/513600765", "http_etag": "\"ba9ec9ba99dd12cdab2c77cf4a581567d1c428e5-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 35, "type": "inline", "id": 513600765}, {"conversion_percentage": 59.574468085106382, "unique_conversion_percentage": 133.33333333333334, "name": "Popup - display every visit", "total_unique_displays": 21, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 28, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/647191251", "http_etag": "\"eb86f399609ba3bcac47328e2c371e36088513dc-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 47, "type": "popup", "id": 647191251}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "LightboxTest", "total_unique_displays": 12, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/961241624", "http_etag": "\"74ec0becd9e2cd53f7952e680695362fd2c1e0dc-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 73, "type": "styled", "id": 961241624}, {"conversion_percentage": 33.333333333333336, "unique_conversion_percentage": 50.0, "name": "Popunder - display every visit", "total_unique_displays": 8, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 4, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/1749423022", "http_etag": "\"eabdab5a1722c124ba3ed2a75c37cbf275ca31b9-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 12, "type": "popunder", "id": 1749423022}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/1921154277", "http_etag": "\"dab71e6152ce104125b6f40762294bb09309e5c6-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "styled", "id": 1921154277}, {"conversion_percentage": 20.0, "unique_conversion_percentage": 100.0, "name": "Popover - display every visit", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 1, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/1939327572", "http_etag": "\"f290d56d439512e483d384768912e6de2a43b92b-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 5, "type": "popover", "id": 1939327572}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Test Light (legacy upgraded.)", "total_unique_displays": 10, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/2046878551", "http_etag": "\"de897ef50aea8fd3300919e3375f22ecdd381708-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 31, "type": "styled", "id": 2046878551}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 2", "total_unique_displays": 4, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/2047103930", "http_etag": "\"5f9a8844dd3a501988cf9045c23c050838a3bf6e-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 9, "type": "styled", "id": 2047103930}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 4", "total_unique_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/164297012", "http_etag": "\"5e3c3b5d1d836e6a74cc6dc3e4fab268b4f731a2-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "type": "styled", "id": 164297012}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 5", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/1642576831", "http_etag": "\"3a9765ef32d2575b4212d89952e5835393a1a094-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1642576831}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 6", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/1733075440", "http_etag": "\"584f653571423fc4d2de45a964410aa4a5fd8cb7-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "styled", "id": 1733075440}, {"conversion_percentage": 150.0, "unique_conversion_percentage": 150.0, "name": "Character Test", "total_unique_displays": 2, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 3, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/406860/web_forms/783905838", "http_etag": "\"6600295b6ac82ad4c898d0d29b1ce6b2291f3328-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 2, "type": "styled", "id": 783905838}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "test", "total_unique_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/487061/web_forms/801072576", "http_etag": "\"85fe08eda612b9ca19c0781da1d1c69e510b6d7c-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "type": "inline", "id": 801072576}]
\ No newline at end of file
diff --git a/tests/data/broadcasts/1337.json b/tests/data/broadcasts/1337.json
new file mode 100644
index 0000000..3f6ebeb
--- /dev/null
+++ b/tests/data/broadcasts/1337.json
@@ -0,0 +1 @@
+{"archive_url": "http://archive.aweber.com/awlist303449/JowqO", "sent_at": "2016-11-07T09:55:10.132392-05:00", "facebook_integration": null, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/broadcasts/33873982", "is_archived": true, "stats": {"num_undeliv": null, "unique_clicks": 0, "unique_opens": 0, "num_emailed": 1, "num_complaints": 0}, "status": "sent", "scheduled_for": "2016-11-07T09:55:01.871213-05:00", "twitter_integration": null, "exclude_lists": [], "click_tracking_enabled": true, "notify_on_send": true, "body_html": "Hi there!", "body_text": "Hi there!", "subject": "bork links", "has_customized_body_text": false, "created_at": "2016-11-07T14:53:13", "segment_name": "All Subscribers", "include_lists": [], "links": [{"rel": "list_archive_rss_url", "href": "http://archive.aweber.com/awlist303449.rss"}, {"rel": "list_archive_url", "href": "http://archive.aweber.com/awlist303449"}], "broadcast_id": 1337}
diff --git a/tests/data/lists/303449/campaigns.json b/tests/data/campaigns/303449.json
similarity index 50%
rename from tests/data/lists/303449/campaigns.json
rename to tests/data/campaigns/303449.json
index 1ff9a96..2115171 100644
--- a/tests/data/lists/303449/campaigns.json
+++ b/tests/data/campaigns/303449.json
@@ -1 +1 @@
-{"total_size": 0, "start": null, "entries": [], "resource_type_link" : "http://api.apitest.lab:81/0.1/#campaign-page-resource"}
+{"total_size": 0, "start": null, "entries": [], "resource_type_link" : "https://api.aweber.com/1.0/#campaign-page-resource"}
diff --git a/tests/data/custom_fields/1.json b/tests/data/custom_fields/1.json
new file mode 100644
index 0000000..edd92fd
--- /dev/null
+++ b/tests/data/custom_fields/1.json
@@ -0,0 +1 @@
+{"name": "Favorite Color", "is_subscriber_updateable": true, "https_etag": "\"356a192b7913b04c54574d18c28d46e6395428ab-cf46a99b7a9ec9059c21044110a3528be7b0a5de\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/1", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 1}
\ No newline at end of file
diff --git a/tests/data/custom_fields/2.json b/tests/data/custom_fields/2.json
new file mode 100644
index 0000000..01b0713
--- /dev/null
+++ b/tests/data/custom_fields/2.json
@@ -0,0 +1 @@
+{"name": "COLOR", "is_subscriber_updateable": true, "https_etag": "\"da4b9237bacccdf19c0760cab7aec4a8359010b0-94bc2de8c0247784c42763ddb76e2b05405199d8\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/2", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 2}
\ No newline at end of file
diff --git a/tests/data/custom_fields/303449.json b/tests/data/custom_fields/303449.json
new file mode 100644
index 0000000..83d51d0
--- /dev/null
+++ b/tests/data/custom_fields/303449.json
@@ -0,0 +1 @@
+{"total_size": 25, "start": 0, "resource_type_link": "https://api.aweber.com/1.0/#custom_field-page-resource", "entries": [{"name": "Favorite Color", "is_subscriber_updateable": true, "https_etag": "\"356a192b7913b04c54574d18c28d46e6395428ab-cf46a99b7a9ec9059c21044110a3528be7b0a5de\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/1", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 1}, {"name": "COLOR", "is_subscriber_updateable": true, "https_etag": "\"da4b9237bacccdf19c0760cab7aec4a8359010b0-94bc2de8c0247784c42763ddb76e2b05405199d8\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/2", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 2}, {"name": "Walruses", "is_subscriber_updateable": false, "https_etag": "\"77de68daecd823babbb58edb1c8e14d7106e83bb-8cf140eeac0798552baaf7727b75087a2a1c0b4b\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/3", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 3}, {"name": "test", "is_subscriber_updateable": false, "https_etag": "\"1b6453892473a467d07372d45eb05abc2031647a-515a2e84687be77dfd27567617d2cbbdd45a8898\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/4", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 4}, {"name": "MyAwesomeCustomField", "is_subscriber_updateable": true, "https_etag": "\"ac3478d69a3c81fa62e60f5c3696165a4e5e6ac4-2b4f2b8465b462fc6b6dfc3cec6ea068a03c4f4f\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/5", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 5}, {"name": "what is my quest", "is_subscriber_updateable": true, "https_etag": "\"c1dfd96eea8cc2b62785275bca38ac261256e278-ca36c26645bb470234ec4a9011fbf709c11bb7bc\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/6", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 6}, {"name": "What do i Seek", "is_subscriber_updateable": true, "https_etag": "\"902ba3cda1883801594b6e1b452790cc53948fda-0cd181dcc074c11cd3a9e9a53f867b7410606f62\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/7", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 7}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"fe5dbbcea5ce7e2988b8c69bcfdfde8904aabc1f-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/8", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 8}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"0ade7c2cf97f75d009975f4d720d1fa6c19f4897-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/9", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 9}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"b1d5781111d84f7b3fe45a0852e59758cd7a87e5-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/10", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 10}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"17ba0791499db908433b80f37c5fbc89b870084b-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/11", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 11}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"7b52009b64fd0a2a49e6d8a939753077792b0554-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/12", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 12}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"bd307a3ec329e10a2cff8fb87480823da114f8f4-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/13", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 13}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"fa35e192121eabf3dabf9f5ea6abdbcbc107ac3b-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/14", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 14}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"f1abd670358e036c31296e66b3b66c382ac00812-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/15", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 15}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"1574bddb75c78a6fd2251d61e2993b5146201319-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/16", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 16}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"0716d9708d321ffb6a00818614779e779925365c-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/17", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 17}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"9e6a55b6b4563e652a23be9d623ca5055c356940-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/18", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 18}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"b3f0c7f6bb763af1be91d9e74eabfeb199dc1f1f-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/19", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 19}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"91032ad7bbcb6cf72875e8e8207dcfba80173f7c-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/20", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 20}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"472b07b9fcf2c2451e8781e944bf5f77cd8457c8-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/21", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 21}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"12c6fc06c99a462375eeb3f43dfd832b08ca9e17-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/22", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 22}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"d435a6cdd786300dff204ee7c2ef942d3e9034e2-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/23", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 23}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"4d134bc072212ace2df385dae143139da74ec0ef-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/24", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 24}, {"name": null, "is_subscriber_updateable": false, "https_etag": "\"f6e1126cedebf23e1463aee73f9df08783640400-f8cbecaf9f2b0d467aebe3909b23a65d1e7c7a82\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/custom_fields/25", "resource_type_link": "https://api.aweber.com/1.0/#custom_field", "id": 25}]}
\ No newline at end of file
diff --git a/tests/data/empty.json b/tests/data/empty.json
new file mode 100644
index 0000000..c227083
--- /dev/null
+++ b/tests/data/empty.json
@@ -0,0 +1 @@
+0
\ No newline at end of file
diff --git a/tests/data/error.json b/tests/data/error.json
index bb8eb9b..2d48c22 100644
--- a/tests/data/error.json
+++ b/tests/data/error.json
@@ -1 +1 @@
-{"error": {"message": "Missing required parameter 'oauth_consumer_key'.", "type": "MissingRequiredOAuthParameterError"}}
+{"error": {"message": "Simulated Exception", "type": "BadRequestError", "documentation_url": "https://labs.aweber.com/docs/troubleshooting#badrequesterror"}}
diff --git a/tests/data/lists.json b/tests/data/lists.json
deleted file mode 100644
index fc113ef..0000000
--- a/tests/data/lists.json
+++ /dev/null
@@ -1 +0,0 @@
-{"total_size": 24, "start": 0, "next_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists?ws.start=20&ws.size=20", "entries": [{"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251847/campaigns", "name": "default251847", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251847/subscribers", "id": 251847, "http_etag": "\"dac7041022b8d1b9690fbc0a34121a19c0461781-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251847", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251847/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251846/campaigns", "name": "default251846", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251846/subscribers", "id": 251846, "http_etag": "\"acefbf9202cfd5d156006591fa0222b7e4f735d2-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251846", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251846/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251845/campaigns", "name": "default251845", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251845/subscribers", "id": 251845, "http_etag": "\"a2845b27890ae073977798afe229933c00b6604a-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251845", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251845/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251843/campaigns", "name": "default251843", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251843/subscribers", "id": 251843, "http_etag": "\"80ef114161f2e417ce3da2a5ae0f45e1f9e2a17d-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251843", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251843/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/312802/campaigns", "name": "anewtestlist", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/312802/subscribers", "id": 312802, "http_etag": "\"b4408834c0f13761cc2f4b90784e1faee5b8d084-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/312802", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/312802/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251848/campaigns", "name": "testmc", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251848/subscribers", "id": 251848, "http_etag": "\"be0d61f3d6cbf34819f74e994b1ffa2c96ed7bb3-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251848", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251848/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/303449/campaigns", "name": "default303449", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/303449/subscribers", "id": 303449, "http_etag": "\"5ba07c4b65dd1f6d245a7fd0dada5ea65b0f054d-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/303449", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/303449/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/305162/campaigns", "name": "herewego12", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/305162/subscribers", "id": 305162, "http_etag": "\"03a0ec4e9f52a0a1a99a8d4a83ef6587eed9a6b8-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/305162", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/305162/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/226186/campaigns", "name": "test-list777", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/226186/subscribers", "id": 226186, "http_etag": "\"e51bc0351083caca2a811a97937225605e80113c-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/226186", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/226186/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251844/campaigns", "name": "default251844", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251844/subscribers", "id": 251844, "http_etag": "\"fd2ed44b31f0b07b1c3e1d8cc094c152e83b2dc5-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251844", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/251844/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/1/campaigns", "name": "test-list2fff", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/1/subscribers", "id": 1, "http_etag": "\"a2e27930058f806c597e52b9f069284cff575588-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/1", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/1/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/301413/campaigns", "name": "test-list1d", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/301413/subscribers", "id": 301413, "http_etag": "\"6a4f25e78b120a99951beae31f3d9491f19d6719-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/301413", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/301413/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/320972/campaigns", "name": "superbenk", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/320972/subscribers", "id": 320972, "http_etag": "\"cd895b82944e86aefd492949d8b7d923d7d28778-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/320972", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/320972/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363010/campaigns", "name": "default363010", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363010/subscribers", "id": 363010, "http_etag": "\"4b095ec0243d40ab613096d8d3f96a609fdd27d5-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363010", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363010/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/307014/campaigns", "name": "devteamtest_2", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/307014/subscribers", "id": 307014, "http_etag": "\"d78abf7131f250f0929a6558f000b8760e76155b-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/307014", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/307014/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/305164/campaigns", "name": "homer_simpson", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/305164/subscribers", "id": 305164, "http_etag": "\"568306713e4d297e2f40948e63f240b1798fc3d8-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/305164", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/305164/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363013/campaigns", "name": "default363013", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363013/subscribers", "id": 363013, "http_etag": "\"4eee1ea48164b794be3891422d0ddbede8c26ecc-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363013", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363013/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363014/campaigns", "name": "default363014", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363014/subscribers", "id": 363014, "http_etag": "\"511a9e0afca20511da481093d1742ce1d3a791bf-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363014", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363014/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363009/campaigns", "name": "super", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363009/subscribers", "id": 363009, "http_etag": "\"570519a927e3bf6a13499bff4c10339ed8572216-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363009", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/363009/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/50000003/campaigns", "name": "default50000003", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/50000003/subscribers", "id": 50000003, "http_etag": "\"0f1b51f3c1fa3f61fe29a7783312371cc4f42149-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/50000003", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/50000003/web_forms"}], "resource_type_link" : "http://api.apitest.lab:81/0.1/#list-page-resource"}
diff --git a/tests/data/lists/303449.json b/tests/data/lists/303449.json
index 582192b..0f2a4c0 100644
--- a/tests/data/lists/303449.json
+++ b/tests/data/lists/303449.json
@@ -1 +1 @@
-{"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/303449/campaigns", "name": "default303449", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/303449/subscribers", "id": 303449, "http_etag": "\"5ba07c4b65dd1f6d245a7fd0dada5ea65b0f054d-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/303449", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/303449/web_forms"}
+{"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/campaigns", "name": "default303449", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/subscribers", "id": 303449, "http_etag": "\"5ba07c4b65dd1f6d245a7fd0dada5ea65b0f054d-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449", "resource_type_link": "https://api.aweber.com/1.0/#list", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/web_forms"}
diff --git a/tests/data/lists/303450.json b/tests/data/lists/303450.json
deleted file mode 100644
index 582192b..0000000
--- a/tests/data/lists/303450.json
+++ /dev/null
@@ -1 +0,0 @@
-{"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/303449/campaigns", "name": "default303449", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/303449/subscribers", "id": 303449, "http_etag": "\"5ba07c4b65dd1f6d245a7fd0dada5ea65b0f054d-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/303449", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/303449/web_forms"}
diff --git a/tests/data/lists/505454.json b/tests/data/lists/505454.json
new file mode 100644
index 0000000..bf8b249
--- /dev/null
+++ b/tests/data/lists/505454.json
@@ -0,0 +1 @@
+{"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/505454/campaigns", "name": "default505454", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/505454/subscribers", "id": 505454, "http_etag": "\"5gaffc4b65dd1f6d245a7fd4acda5ea65b0f054d-ca5feee2baecb6febfca8af55eded1ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/505454", "resource_type_link": "https://api.aweber.com/1.0/#list", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/505454/web_forms"}
diff --git a/tests/data/lists/page1.json b/tests/data/lists/page1.json
new file mode 100644
index 0000000..ff6b830
--- /dev/null
+++ b/tests/data/lists/page1.json
@@ -0,0 +1 @@
+{"total_size": 24, "start": 0, "resource_type_link": "https://api.aweber.com/1.0/#list-page-resource", "next_collection_link": "https://api.aweber.com/1.0/accounts/1/lists?ws.start=20&ws.size=20", "entries": [{"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701533/campaigns", "name": "dailydrseuss1", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701533/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701533/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701533/web_forms", "http_etag": "\"547d7402c7f528a2dbefeffa85eb973b13ed002f-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1701533", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1701533}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701501/campaigns", "name": "default1701501", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701501/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701501/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701501/web_forms", "http_etag": "\"710e976cbede7ee0befc9a78bbb079b67a1e8a22-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1701501", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1701501}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701500/campaigns", "name": "default1701500", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701500/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701500/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701500/web_forms", "http_etag": "\"9bb23b65ff2f1c755ba07691c8896114aea79303-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1701500", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1701500}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701498/campaigns", "name": "default1701498", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701498/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701498/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701498/web_forms", "http_etag": "\"e483a56588e762a709329a75f02b98ba25a744c0-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1701498", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1701498}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701497/campaigns", "name": "default1701497", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701497/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701497/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701497/web_forms", "http_etag": "\"98fb0fa002a470133ef1cc2074064f25523f8351-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1701497", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1701497}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701494/campaigns", "name": "default1701494", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701494/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701494/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701494/web_forms", "http_etag": "\"2c1cd24fac1d6fbee9585007f16c3506ae0691be-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1701494", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1701494}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701492/campaigns", "name": "default1701492", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701492/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701492/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701492/web_forms", "http_etag": "\"15a50d4956d93ec26da11bf8411289c445b91b83-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1701492", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1701492}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701491/campaigns", "name": "default1701491", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701491/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701491/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701491/web_forms", "http_etag": "\"61a6028d19143623ccac12151640a84a21f20836-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1701491", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1701491}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701489/campaigns", "name": "default1701489", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701489/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701489/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701489/web_forms", "http_etag": "\"227bd84ee1763f3b46a3c37309a84b024a2c6c86-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1701489", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1701489}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701487/campaigns", "name": "default1701487", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701487/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701487/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701487/web_forms", "http_etag": "\"12edfe9548eaaf794d26606454f666f2525cce34-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1701487", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1701487}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701486/campaigns", "name": "default1701486", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701486/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701486/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701486/web_forms", "http_etag": "\"d8dca7c18825db31e24aa1ddaf51cdd8c6d74abd-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1701486", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1701486}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701482/campaigns", "name": "default1701482", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701482/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701482/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1701482/web_forms", "http_etag": "\"63a30a5a3b92aa45667efc7b7cba1df230883394-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1701482", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1701482}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1694928/campaigns", "name": "test-stevee01", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1694928/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1694928/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1694928/web_forms", "http_etag": "\"a27c0c9651a6309547835e18bb2920a44eb43ccc-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1694928", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1694928}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1683832/campaigns", "name": "elong_api", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1683832/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1683832/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1683832/web_forms", "http_etag": "\"21e28bffb390cb82d069dd923cf99f5d9164b5fe-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1683832", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1683832}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1673482/campaigns", "name": "default1673482", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1673482/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1673482/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1673482/web_forms", "http_etag": "\"10009452dfe8d4f6a77215a22d83735bdad5a5f6-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1673482", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1673482}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1553018/campaigns", "name": "default1553018", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1553018/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1553018/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1553018/web_forms", "http_etag": "\"4ab41e60d14ea138a4522b3d2896942b7335c13c-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1553018", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1553018}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1550685/campaigns", "name": "default1550685", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1550685/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1550685/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1550685/web_forms", "http_etag": "\"685c00e3983add5e4efb5ca3bc7294e247f6e9fe-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1550685", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1550685}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1550679/campaigns", "name": "default1550679", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1550679/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1550679/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1550679/web_forms", "http_etag": "\"0aaa38a50287df08ccb74c7f13fca8679aab688a-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1550679", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1550679}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1482694/campaigns", "name": "default1482694", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1482694/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1482694/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1482694/web_forms", "http_etag": "\"fa5b88866c12617f4a74276b226bf8973a45cf73-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1482694", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1482694}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1424745/campaigns", "name": "jrodneyotest", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1424745/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1424745/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1424745/web_forms", "http_etag": "\"e6edf11299299d16e7c848a3d42a52bba63daacd-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1424745", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1424745}]}
diff --git a/tests/data/lists/page2.json b/tests/data/lists/page2.json
new file mode 100644
index 0000000..26cd3ff
--- /dev/null
+++ b/tests/data/lists/page2.json
@@ -0,0 +1 @@
+{"total_size": 24, "prev_collection_link": "https://api.aweber.com/1.0/accounts/1/lists?ws.start=0&ws.size=20", "start": 20, "entries": [{"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1364473/campaigns", "name": "default1364473", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1364473/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1364473/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1364473/web_forms", "http_etag": "\"dd77357a87c343b20234254438ae7094aeff2b3d-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1364473", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1364473}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1211626/campaigns", "name": "tk-unlimited", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1211626/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1211626/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1211626/web_forms", "http_etag": "\"cfd8bbcad976f5271368a5b3e646ea364efcd9e0-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1211626", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1211626}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/campaigns", "name": "devteamtest_2", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/307014/web_forms", "http_etag": "\"d78abf7131f250f0929a6558f000b8760e76155b-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/307014", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 307014}, {"campaigns_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1205629/campaigns", "name": "default1205629", "web_form_split_tests_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1205629/web_form_split_tests", "subscribers_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1205629/subscribers", "web_forms_collection_link": "https://api.aweber.com/1.0/accounts/1/lists/1205629/web_forms", "http_etag": "\"f98f71baf8860d3522b4e88cb0acccabebaa9369-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1205629", "resource_type_link": "https://api.aweber.com/1.0/#list", "id": 1205629}], "resource_type_link": "https://api.aweber.com/1.0/#list-page-resource"}
diff --git a/tests/data/lists_page2.json b/tests/data/lists_page2.json
deleted file mode 100644
index 2bf6446..0000000
--- a/tests/data/lists_page2.json
+++ /dev/null
@@ -1 +0,0 @@
-{"total_size": 24, "start": 20, "prev_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists?ws.start=0&ws.size=20", "entries": [{"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/50000002/campaigns", "name": "one_two_test", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/50000002/subscribers", "id": 50000002, "http_etag": "\"daeb57124532aac221374522cb6c07754e71ba21-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/50000002", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/50000002/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/406860/campaigns", "name": "devteamtest", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/406860/subscribers", "id": 406860, "http_etag": "\"db00e81c0187d524ac56a254636664e14e90184b-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/406860", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/406860/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/50000054/campaigns", "name": "furedesign_test", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/50000054/subscribers", "id": 50000054, "http_etag": "\"d082409a783f7f4f955cca186e17eb39d4b28045-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/50000054", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/50000054/web_forms"}, {"campaigns_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/327293/campaigns", "name": "anewtestlist1", "subscribers_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/327293/subscribers", "id": 327293, "http_etag": "\"99057bd859740bc8cb946dac3bf6d44a3bcc5a72-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "self_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/327293", "resource_type_link": "http://api.apitest.lab:81/0.1/#list", "web_forms_collection_link": "http://api.apitest.lab:81/0.1/accounts/1/lists/327293/web_forms"}], "resource_type_link" : "http://api.apitest.lab:81/0.1/#list-page-resource"}
diff --git a/tests/data/subscribers/1.json b/tests/data/subscribers/1.json
index 60d19de..ca977d9 100644
--- a/tests/data/subscribers/1.json
+++ b/tests/data/subscribers/1.json
@@ -1 +1 @@
-{"subscription_url": null, "postal_code": "19006", "id": 1, "custom_fields": {"Trim": "EX", "Make": "Honda", "Model": "Civic", "Year": "2007"}, "last_followup_sent_link": "http://api.aweber.com/1.0/accounts/1/lists/1/campaigns/f2", "city": "Huntingdon Valley", "http_etag": "\"f3cd054da8ee5fcc8fd62765f1248a3e286a1e98-5452a183e6c35a9d38607ef778eba4fbf56db21e\"", "ad_tracking": "asasdffasdfasff", "dma_code": 143, "last_followup_message_number_sent": 1, "last_followup_sent_at": null, "misc_notes": null, "latitude": 23.23, "is_verified": false, "email": "joe@example.com", "status": "unsubscribed", "area_code": 267, "unsubscribed_at": "2010-12-16 20:57:51.178863-05:00", "self_link": "http://api.aweber.com/1.0/accounts/1/lists/1/subscribers/1", "ip_address": null, "name": "Joe Jones", "subscription_method": "email", "resource_type_link": "http://api.aweber.com/1.0/#subscriber", "region": "North America", "longitude": 70.340000000000003, "verified_at": "2010-12-17 01:57:51.178816", "subscribed_at": "2010-12-16 20:57:51.178856-05:00", "country": "USA"}
+{"subscription_url": "https://www.aweber.com/users/leads/add", "name": "Joe Jones", "postal_code": "14450", "id": 50205517, "custom_fields": {"what is my quest": "", "Color": "blue", "COLOR": "", "asdfasdf": "", "test": "", "Walruses": "32"}, "last_followup_sent_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/campaigns/f3548399", "city": "Fairport", "http_etag": "\"e60b496d99539173e3d994dbe41e8efd5154c42b-139949b906d1ffef2d531c166eed3152968d3bc8\"", "ad_tracking": "testing", "dma_code": 538, "last_followup_message_number_sent": 3, "last_followup_sent_at": "2010-01-29 00:10:57.617606-05:00", "is_verified": true, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/subscribers/50205517", "resource_type_link": "https://api.aweber.com/1.0/#subscriber", "status": "subscribed", "unsubscribed_at": null, "area_code": 585, "latitude": 43.100499999999997, "subscription_method": "signup form", "country": "United States", "region": "NY", "longitude": -77.426000000000002, "verified_at": "2010-01-15 09:25:53", "subscribed_at": "2010-01-15 09:21:39-05:00"}
diff --git a/tests/data/subscribers/2.json b/tests/data/subscribers/2.json
new file mode 100644
index 0000000..1ef1276
--- /dev/null
+++ b/tests/data/subscribers/2.json
@@ -0,0 +1 @@
+{"subscription_url": "https://www.aweber.com/users/leads/add", "postal_code": "14450", "id": 52628638, "custom_fields": {"what is my quest": null, "Color": null, "COLOR": null, "asdfasdf": null, "test": null, "Walruses": null}, "last_followup_sent_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/campaigns/f3548399", "city": "Fairport", "http_etag": "\"f82f8c9121f8eb4a5f5c492b7be8d6a0a08c3d00-84189fc55bac463725b58eaa1e0011242c4f8993\"", "ad_tracking": "control panel", "dma_code": 538, "last_followup_message_number_sent": 3, "last_followup_sent_at": "2011-03-01 00:48:35.529460-05:00", "is_verified": true, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/subscribers/52628638", "resource_type_link": "https://api.aweber.com/1.0/#subscriber", "status": "subscribed", "unsubscribed_at": null, "area_code": 585, "latitude": 43.100499999999997, "subscription_method": "signup form", "country": "United States", "region": "NY", "longitude": -77.426000000000002, "verified_at": "2011-02-15 11:50:27", "subscribed_at": "2011-02-15 11:49:55-05:00"}
\ No newline at end of file
diff --git a/tests/data/subscribers/3.json b/tests/data/subscribers/3.json
new file mode 100644
index 0000000..76fa5e5
--- /dev/null
+++ b/tests/data/subscribers/3.json
@@ -0,0 +1 @@
+{"subscription_url": "https://www.aweber.com/users/leads/add", "postal_code": "14450", "id": 52629234, "custom_fields": {"what is my quest": null, "Color": null, "COLOR": null, "asdfasdf": null, "test": null, "Walruses": null}, "last_followup_sent_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/campaigns/f3548399", "city": "Fairport", "http_etag": "\"f6a629a0a3994371c9d93ca2ab799295280669a9-3ad4b6214f0137033f4cca61d710063030611f48\"", "ad_tracking": "control panel", "dma_code": 538, "last_followup_message_number_sent": 3, "last_followup_sent_at": "2011-03-02 14:47:22.797206-05:00", "is_verified": true, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/subscribers/52629234", "resource_type_link": "https://api.aweber.com/1.0/#subscriber", "status": "subscribed", "unsubscribed_at": null, "area_code": 585, "latitude": 43.100499999999997, "subscription_method": "signup form", "country": "United States", "region": "NY", "longitude": -77.426000000000002, "verified_at": "2011-02-15 13:37:23", "subscribed_at": "2011-02-15 13:27:28-05:00"}
\ No newline at end of file
diff --git a/tests/data/subscribers/activity.json b/tests/data/subscribers/activity.json
new file mode 100644
index 0000000..2b70602
--- /dev/null
+++ b/tests/data/subscribers/activity.json
@@ -0,0 +1 @@
+{"start": 0, "total_size_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/subscribers/1?ws.op=getActivity&ws.op=total_size", "entries": [{"subscription_url": "https://www.aweber.com/users/leads/add", "postal_code": "14450", "id": 52629234, "custom_fields": {"NewCustomField": "really awesome", "YourCustomField": "NewValue"}, "last_followup_sent_link": "https://api.aweber.com/1.0/accounts/1/lists/496562/campaigns/f3548399", "city": "Fairport", "http_etag": "\"223a06015fdd0daaef1b561aee4f10176513e346-075619e34cfd24154382b5a53939132945e96ce3\"", "ad_tracking": "control panel", "dma_code": 538, "last_followup_message_number_sent": 3, "last_followup_sent_at": "2011-03-02 14:47:22.797206-05:00", "misc_notes": "", "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/subscribers/1", "is_verified": true, "email": "joe@example.com", "status": "subscribed", "unsubscribed_at": null, "area_code": 585, "latitude": 43.100499999999997, "unsubscribe_method": null, "ip_address": "192.168.10.10", "name": "Joe User", "subscription_method": "signup form", "resource_type_link": "https://api.aweber.com/1.0/#subscriber", "region": "NY", "longitude": -77.426000000000002, "verified_at": "2011-02-15 13:37:23", "subscribed_at": "2011-02-15 13:27:28-05:00", "country": "United States"}]}
diff --git a/tests/data/subscribers/activity_ts.json b/tests/data/subscribers/activity_ts.json
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/data/subscribers/activity_ts.json
@@ -0,0 +1 @@
+1
diff --git a/tests/data/subscribers/find.json b/tests/data/subscribers/find.json
new file mode 100644
index 0000000..d9ee9f2
--- /dev/null
+++ b/tests/data/subscribers/find.json
@@ -0,0 +1 @@
+{"total_size_link": "/accounts/1/lists/303449/subscribers?email=someone%40example.com&ws.op=find&ws.show=total_size", "start": 0, "resource_type_link": "https://api.aweber.com/1.0/#subscriber-page-resource", "entries": [{"subscription_url": "https://www.aweber.com/users/leads/add", "postal_code": "14450", "id": 50205517, "custom_fields": {"what is my quest": "", "Color": "blue", "COLOR": "", "asdfasdf": "", "test": "", "Walruses": ""}, "last_followup_sent_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/campaigns/f3548399", "city": "Fairport", "http_etag": "\"e60b496d99539173e3d994dbe41e8efd5154c42b-139949b906d1ffef2d531c166eed3152968d3bc8\"", "ad_tracking": "testing", "dma_code": 538, "last_followup_message_number_sent": 3, "last_followup_sent_at": "2010-01-29 00:10:57.617606-05:00", "is_verified": true, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/subscribers/50205517", "resource_type_link": "https://api.aweber.com/1.0/#subscriber", "status": "subscribed", "unsubscribed_at": null, "area_code": 585, "latitude": 43.100499999999997, "subscription_method": "signup form", "country": "United States", "region": "NY", "longitude": -77.426000000000002, "verified_at": "2010-01-15 09:25:53", "subscribed_at": "2010-01-15 09:21:39-05:00"}]}
diff --git a/tests/data/subscribers/find_1of2.json b/tests/data/subscribers/find_1of2.json
new file mode 100644
index 0000000..f869d73
--- /dev/null
+++ b/tests/data/subscribers/find_1of2.json
@@ -0,0 +1 @@
+{"next_collection_link": "/accounts/1/lists/303449/subscribers?status=unsubscribed&ws.size=1&ws.start=1&ws.op=find", "total_size_link": "/accounts/1/lists/303449/subscribers?status=unsubscribed&ws.size=1&ws.start=1&ws.op=find&ws.show=total_size", "start": 0, "resource_type_link": "https://api.aweber.com/1.0/#subscriber-page-resource", "entries": [{"subscription_url": "https://www.aweber.com/users/leads/add", "postal_code": "14450", "id": 50205517, "custom_fields": {"what is my quest": "", "Color": "blue", "COLOR": "", "asdfasdf": "", "test": "", "Walruses": ""}, "last_followup_sent_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/campaigns/f3548399", "city": "Davenport", "http_etag": "\"e60b496d99539173e3d994dbe41e8efd5154c42b-139949b906d1ffef2d531c166eed3152968d3bc8\"", "ad_tracking": "testing", "dma_code": 538, "last_followup_message_number_sent": 3, "last_followup_sent_at": "2010-01-29 00:10:57.617606-05:00", "is_verified": true, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/subscribers/50205517", "resource_type_link": "https://api.aweber.com/1.0/#subscriber", "status": "subscribed", "unsubscribed_at": null, "area_code": 585, "latitude": 43.100499999999997, "subscription_method": "signup form", "country": "United States", "region": "NY", "longitude": -77.426000000000002, "verified_at": "2010-01-15 09:25:53", "subscribed_at": "2010-01-15 09:21:39-05:00"}]}
diff --git a/tests/data/subscribers/find_1of2_tsl.json b/tests/data/subscribers/find_1of2_tsl.json
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/tests/data/subscribers/find_1of2_tsl.json
@@ -0,0 +1 @@
+2
diff --git a/tests/data/subscribers/find_2of2.json b/tests/data/subscribers/find_2of2.json
new file mode 100644
index 0000000..4377a84
--- /dev/null
+++ b/tests/data/subscribers/find_2of2.json
@@ -0,0 +1 @@
+{"prev_collection_link": "/accounts/1/lists/303449/subscribers?status=unsubscribed&ws.size=1&ws.start=0&ws.op=find", "total_size_link": "/accounts/1/lists/303449/subscribers?status=unsubscribed&ws.size=1&ws.start=1&ws.op=find&ws.show=total_size", "start": 0, "resource_type_link": "https://api.aweber.com/1.0/#subscriber-page-resource", "entries": [{"subscription_url": "https://www.aweber.com/users/leads/add", "postal_code": "14450", "id": 50205517, "custom_fields": {"what is my quest": "", "Color": "blue", "COLOR": "", "asdfasdf": "", "test": "", "Walruses": ""}, "last_followup_sent_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/campaigns/f3548399", "city": "Davenport", "http_etag": "\"e60b496d99539173e3d994dbe41e8efd5154c42b-139949b906d1ffef2d531c166eed3152968d3bc8\"", "ad_tracking": "testing", "dma_code": 538, "last_followup_message_number_sent": 3, "last_followup_sent_at": "2010-01-29 00:10:57.617606-05:00", "is_verified": true, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/subscribers/50205518", "resource_type_link": "https://api.aweber.com/1.0/#subscriber", "status": "subscribed", "unsubscribed_at": null, "area_code": 585, "latitude": 43.100499999999997, "subscription_method": "signup form", "country": "United States", "region": "NY", "longitude": -77.426000000000002, "verified_at": "2010-01-15 09:25:53", "subscribed_at": "2010-01-15 09:21:39-05:00"}]}
diff --git a/tests/data/subscribers/find_tsl.json b/tests/data/subscribers/find_tsl.json
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/data/subscribers/find_tsl.json
@@ -0,0 +1 @@
+1
diff --git a/tests/data/subscribers/nonexist.json b/tests/data/subscribers/nonexist.json
new file mode 100644
index 0000000..4861035
--- /dev/null
+++ b/tests/data/subscribers/nonexist.json
@@ -0,0 +1 @@
+{"total_size_link": "/accounts/1/lists/303449/subscribers?email=nonexist%40example.com&ws.op=find&ws.show=total_size", "start": 0, "resource_type_link": "https://api.aweber.com/1.0/#subscriber-page-resource", "entries": []}
diff --git a/tests/data/subscribers/nonexist_tsl.json b/tests/data/subscribers/nonexist_tsl.json
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/data/subscribers/nonexist_tsl.json
@@ -0,0 +1 @@
+0
diff --git a/tests/data/subscribers/page1.json b/tests/data/subscribers/page1.json
new file mode 100644
index 0000000..27e7ccf
--- /dev/null
+++ b/tests/data/subscribers/page1.json
@@ -0,0 +1 @@
+{"total_size": 5, "start": 0, "resource_type_link": "https://api.aweber.com/1.0/#subscriber-page-resource", "entries": [{"subscription_url": "https://www.aweber.com/users/leads/add", "postal_code": "14450", "id": 50205517, "custom_fields": {"what is my quest": "", "Color": "blue", "COLOR": "", "asdfasdf": "", "test": "", "Walruses": ""}, "last_followup_sent_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/campaigns/f3548399", "city": "Fairport", "http_etag": "\"e60b496d99539173e3d994dbe41e8efd5154c42b-139949b906d1ffef2d531c166eed3152968d3bc8\"", "ad_tracking": "testing", "dma_code": 538, "last_followup_message_number_sent": 3, "last_followup_sent_at": "2010-01-29 00:10:57.617606-05:00", "is_verified": true, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/subscribers/50205517", "resource_type_link": "https://api.aweber.com/1.0/#subscriber", "status": "subscribed", "unsubscribed_at": null, "area_code": 585, "latitude": 43.100499999999997, "subscription_method": "signup form", "country": "United States", "region": "NY", "longitude": -77.426000000000002, "verified_at": "2010-01-15 09:25:53", "subscribed_at": "2010-01-15 09:21:39-05:00"}, {"subscription_url": "https://www.aweber.com/users/leads/add", "postal_code": "14450", "id": 52628638, "custom_fields": {"what is my quest": null, "Color": null, "COLOR": null, "asdfasdf": null, "test": null, "Walruses": null}, "last_followup_sent_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/campaigns/f3548399", "city": "Fairport", "http_etag": "\"f82f8c9121f8eb4a5f5c492b7be8d6a0a08c3d00-84189fc55bac463725b58eaa1e0011242c4f8993\"", "ad_tracking": "control panel", "dma_code": 538, "last_followup_message_number_sent": 3, "last_followup_sent_at": "2011-03-01 00:48:35.529460-05:00", "is_verified": true, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/subscribers/52628638", "resource_type_link": "https://api.aweber.com/1.0/#subscriber", "status": "subscribed", "unsubscribed_at": null, "area_code": 585, "latitude": 43.100499999999997, "subscription_method": "signup form", "country": "United States", "region": "NY", "longitude": -77.426000000000002, "verified_at": "2011-02-15 11:50:27", "subscribed_at": "2011-02-15 11:49:55-05:00"}, {"subscription_url": "https://www.aweber.com/users/leads/add", "postal_code": "14450", "id": 52629234, "custom_fields": {"what is my quest": null, "Color": null, "COLOR": null, "asdfasdf": null, "test": null, "Walruses": null}, "last_followup_sent_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/campaigns/f3548399", "city": "Fairport", "http_etag": "\"f6a629a0a3994371c9d93ca2ab799295280669a9-3ad4b6214f0137033f4cca61d710063030611f48\"", "ad_tracking": "control panel", "dma_code": 538, "last_followup_message_number_sent": 3, "last_followup_sent_at": "2011-03-02 14:47:22.797206-05:00", "is_verified": true, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/subscribers/52629234", "resource_type_link": "https://api.aweber.com/1.0/#subscriber", "status": "subscribed", "unsubscribed_at": null, "area_code": 585, "latitude": 43.100499999999997, "subscription_method": "signup form", "country": "United States", "region": "NY", "longitude": -77.426000000000002, "verified_at": "2011-02-15 13:37:23", "subscribed_at": "2011-02-15 13:27:28-05:00"}, {"subscription_url": "https://www.aweber.com/users/leads/add", "postal_code": "14450", "id": 52736751, "custom_fields": {"what is my quest": null, "Color": "5", "COLOR": "1", "asdfasdf": null, "test": "1", "Walruses": "1"}, "last_followup_sent_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/campaigns/f3548390", "city": "Fairport", "http_etag": "\"960ea4ccfa09531a7ed474bf698e3945857546be-dad6f6913eb8b9484b3b2aa01fd938637a100736\"", "ad_tracking": "control panel", "dma_code": 538, "last_followup_message_number_sent": 1, "last_followup_sent_at": "2011-03-04 08:47:07.194842-05:00", "is_verified": true, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/subscribers/52736751", "resource_type_link": "https://api.aweber.com/1.0/#subscriber", "status": "unsubscribed", "unsubscribed_at": "2011-03-07 15:48:32.409082-05:00", "area_code": 585, "latitude": 43.100499999999997, "subscription_method": "signup form", "country": "United States", "region": "NY", "longitude": -77.426000000000002, "verified_at": "2011-03-04 08:35:49", "subscribed_at": "2011-03-03 17:11:07-05:00"}, {"subscription_url": "https://www.aweber.com/users/leads/add", "postal_code": "14450", "id": 52754436, "custom_fields": {"what is my quest": null, "Color": null, "COLOR": null, "asdfasdf": null, "test": null, "Walruses": null}, "last_followup_sent_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/campaigns/f3548390", "city": "Fairport", "http_etag": "\"e79a7a8f1f41947b6155243d8e4c9b1d3e1c7f82-8772003459a8b72fa59301e9e68bfc73b9a53c36\"", "ad_tracking": "control panel", "dma_code": 538, "last_followup_message_number_sent": 1, "last_followup_sent_at": "2011-03-08 15:52:02.979758-05:00", "is_verified": true, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/303449/subscribers/52754436", "resource_type_link": "https://api.aweber.com/1.0/#subscriber", "status": "unsubscribed", "unsubscribed_at": "2011-03-09 10:27:43.752801-05:00", "area_code": 585, "latitude": 43.100499999999997, "subscription_method": "signup form", "country": "United States", "region": "NY", "longitude": -77.426000000000002, "verified_at": "2011-03-08 15:50:39", "subscribed_at": "2011-03-08 15:49:26-05:00"}]}
diff --git a/tests/data/web_forms.json b/tests/data/web_forms.json
deleted file mode 100644
index 24635f0..0000000
--- a/tests/data/web_forms.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 0, "type": "styled", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1192556/web_forms/1733464505", "http_etag": "\"81c5932ffaf2418e6547f3db29ff430f83c9ad79-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 1733464505}, {"conversion_percentage": 33.333333333333329, "unique_conversion_percentage": 100.0, "name": "My Web Form", "total_unique_displays": 1, "type": "styled", "is_active": true, "total_submissions": 1, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1121402/web_forms/1369283626", "http_etag": "\"29ac5759b22c6d92eec850b40f2e270e42b8f6fd-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 3, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 1369283626}, {"conversion_percentage": 0.11641443538998836, "unique_conversion_percentage": 0.26515151515151519, "name": "Home page, sidebar", "total_unique_displays": 2640, "type": "styled", "is_active": true, "total_submissions": 7, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/1093432/web_forms/356827526", "http_etag": "\"d131de42f8375408f277ccee852edec27fbf8321-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 6013, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 356827526}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": null, "total_unique_displays": 0, "type": "styled", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/771601/web_forms/131500557", "http_etag": "\"1288c4078b1f5a78197f267b9b0e3079320aa015-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 131500557}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Testing", "total_unique_displays": 0, "type": "inline", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/771601/web_forms/180597630", "http_etag": "\"9e0dc548e60eecde94661e53f06380f411118e70-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 180597630}, {"conversion_percentage": 33.333333333333329, "unique_conversion_percentage": 50.0, "name": "fdsdfsdfdfs", "total_unique_displays": 2, "type": "styled", "is_active": true, "total_submissions": 1, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/771601/web_forms/270024008", "http_etag": "\"50d20937bcc6ae716543f3da492d71302f7ba5da-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 3, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 270024008}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 0, "type": "styled", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/771601/web_forms/721555577", "http_etag": "\"82b4eb089fd0b6a0b157bda1373115d146feb59b-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 721555577}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": null, "total_unique_displays": 0, "type": "styled", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/771601/web_forms/1070664099", "http_etag": "\"76e920f4b1d7ee7763b1f41a59a243a8187aba99-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 1070664099}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": null, "total_unique_displays": 0, "type": "styled", "is_active": true, "total_submissions": 1, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/771601/web_forms/2013603311", "http_etag": "\"b6691478c2334176f9c0a0065e729e5511258aa5-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 2013603311}, {"conversion_percentage": 1.1469142545057347, "unique_conversion_percentage": 3.9585296889726673, "name": "website", "total_unique_displays": 1061, "type": "inline", "is_active": true, "total_submissions": 42, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/771601/web_forms/1077762960", "http_etag": "\"4037f3d1f0c29bb19a3a5d92d13e7f0d96dd3bb1-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 3662, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 1077762960}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "blarhg", "total_unique_displays": 1, "type": "inline", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/798061/web_forms/668327018", "http_etag": "\"36e02decd31624698c6753a7f6f8b246017ca6f2-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 5, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 668327018}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "New Form 785164876", "total_unique_displays": 0, "type": "styled", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/798061/web_forms/785164876", "http_etag": "\"99ad3b309fd7caa39cdc74a57093199166847ddb-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 785164876}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "barf", "total_unique_displays": 1, "type": "popover", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/798061/web_forms/1437187399", "http_etag": "\"83222600a0690071080e876fdf0d62c948ae0807-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 1437187399}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Old ass legacy stinky form", "total_unique_displays": 0, "type": "lightbox", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/853318/web_forms/1126276203", "http_etag": "\"c8b7aad2c71683c23296ca4469e125fa3af67fee-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 1126276203}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form 2", "total_unique_displays": 0, "type": "styled", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/853318/web_forms/1222053368", "http_etag": "\"4372b1ea1703db57e6f588d777244c903815c10b-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 1222053368}, {"conversion_percentage": 400.0, "unique_conversion_percentage": 400.0, "name": "Sample", "total_unique_displays": 1, "type": "styled", "is_active": true, "total_submissions": 4, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/853318/web_forms/1653200290", "http_etag": "\"552639ecbb958d98848a020ab38abce5f805db00-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 1653200290}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "New Form 1900114264", "total_unique_displays": 0, "type": "styled", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/853318/web_forms/1900114264", "http_etag": "\"ccb02527c3b7060d649ff8b611ccd4531d46cc85-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 1900114264}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Form popup", "total_unique_displays": 0, "type": "inline", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/853318/web_forms/1938455405", "http_etag": "\"29e56cc073fdf5e9d5dcdcbef5ef9f4adcd0b98e-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 1938455405}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "My Web Form", "total_unique_displays": 0, "type": "styled", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/853318/web_forms/2082623301", "http_etag": "\"3023b1ad6b3e0fbc52129deb5a55ce1effd56bef-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 2082623301}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Sign up for free newsletter", "total_unique_displays": 1, "type": "inline", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/853404/web_forms/1276584893", "http_etag": "\"a8ab161350d7e0d244913ff848f301c7ba66029e-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 1, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 1276584893}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "New styled form", "total_unique_displays": 1, "type": "styled", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/853399/web_forms/992299989", "http_etag": "\"669b36b1c356151329743774bff0edd1bd5a2877-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 3, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 992299989}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Existing Styled form", "total_unique_displays": 0, "type": "styled", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/853399/web_forms/1716841568", "http_etag": "\"013c2ffd669a6dff74db540bcaaaebc2494ef682-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 1716841568}, {"conversion_percentage": 0.0, "unique_conversion_percentage": 0.0, "name": "Legacy form", "total_unique_displays": 0, "type": "styled", "is_active": true, "total_submissions": 0, "self_link": "https://api.aweber.com/1.0/accounts/1/lists/853399/web_forms/2120561755", "http_etag": "\"c58a76526d5614ae99fac801207b18851b8f6284-ca5feee2b7fbb6febfca8af5541541ea960aaedb\"", "total_displays": 0, "resource_type_link": "https://api.aweber.com/1.0/#web_form", "id": 2120561755}]
diff --git a/tests/mock_adapter.php b/tests/mock_adapter.php
index 6811426..f23da9d 100644
--- a/tests/mock_adapter.php
+++ b/tests/mock_adapter.php
@@ -1,58 +1,130 @@
array(
- '/accounts' => 'accounts',
- '/accounts/1' => 'account',
- '/accounts/1/lists' => 'lists',
- '/accounts/1?ws.op=getWebForms' => 'web_forms',
- '/accounts/910/lists' => 'lists',
- '/accounts/1/lists?ws.size=20&ws.start=20' => 'lists_page2',
- '/accounts/1/lists/303449' => 'lists/303449',
- '/accounts/1/lists/303450' => 'lists/303450',
- '/accounts/910/lists/123456' => 'error',
- '/accounts/1/lists/303449/campaigns' => 'lists/303449/campaigns',
- '/accounts/1/lists/1/subscribers/1' => 'subscribers/1',
- ),
- 'DELETE' => array(
- '/accounts/1/lists/303449' => '200',
- '/accounts/1' => '404',
- ),
- 'PATCH' => array(
- '/accounts/1/lists/303449' => '209',
- '/accounts/1/lists/303450' => '404',
- '/accounts/1/lists/1/subscribers/1' => '209',
- )
- );
-
- public function addRequest($method, $uri, $data) {
+ public function addRequest($method, $uri, $data, $headers) {
$this->requestsMade[] = array(
'method' => $method,
'uri' => $uri,
- 'data' => $data);
+ 'data' => $data,
+ 'headers' => $headers);
}
public function clearRequests() {
$this->requestsMade = array();
}
- public function request($method, $uri, $data=array(), $options=array()) {
- if ($method == 'GET' && !empty($data)) {
- $uri = $uri.'?'. http_build_query($data);
- }
- $this->addRequest($method, $uri, $data);
- if (!empty($options['return']) && $options['return'] == 'status') {
- return $this->requests[$method][$uri];
- }
- $data = MockData::load($this->requests[$method][$uri]);
- $this->parseAsError($data);
+ /*
+ * Overriding parent to prevent the addition of the OAuth parameters
+ */
+ public function prepareRequest($method, $url, $data)
+ {
return $data;
}
-}
+ public function makeRequest($method, $url, $data=array(), $headers=array()) {
+ global $map;
+
+ # append params to url (for fixtures)
+ $uri = str_replace($this->app->baseUri, '', $url);
+ list($url_params, $request_body) = $this->formatRequestData($method, $uri, $data, $headers);
+ $uri = $this->_addParametersToUrl($uri, $url_params);
+
+ # extract response map parameters
+ #
+ $status = $map[$method][$uri][0];
+ $resource = $map[$method][$uri][1];
+
+ # record the request
+ $this->addRequest($method, $uri, $data, $headers);
+
+ # load response from fixture and return data
+ $mock_data = MockData::load($resource);
+ if (!$mock_data) {
+ $msg = 'Unable to connect to the AWeber API. Please ensure that CURL is enabled and your ';
+ $msg .= 'firewall allows outbound SSL requests from your web server.';
+ $error = array('message' => $msg, 'type' => 'APIUnreachableError',
+ 'documentation_url' => 'https://labs.aweber.com/docs/troubleshooting');
+ throw new AWeberAPIException($error, $url);
+ }
+
+ $headers = array();
+ $headers['Status-Code'] = $status;
+
+ if($status == 201) {
+ $headers['Location'] = $resource;
+ }
+ $mock_data->headers = $headers;
+
+ if($headers['Status-Code'] >= 400) {
+ $data = json_decode($mock_data->body, true);
+ throw new AWeberAPIException($data['error'], $url);
+
+ }
+ return $mock_data;
+ }
+}
diff --git a/tests/mock_data.php b/tests/mock_data.php
index f0d6336..baaf50f 100644
--- a/tests/mock_data.php
+++ b/tests/mock_data.php
@@ -1,5 +1,13 @@
body = $data;
+ return $mock_data;
}
}
diff --git a/tests/oauth_application.test.php b/tests/oauth_application.test.php
deleted file mode 100644
index 0747da9..0000000
--- a/tests/oauth_application.test.php
+++ /dev/null
@@ -1,294 +0,0 @@
-oauth = new OAuthApplication($parentApp);
- $this->oauth->consumerSecret = 'CONSUMERSECRET';
- $this->oauth->consumerKey = 'consumer_key';
- }
-
- /**
- * testUniqueNonce
- *
- * GenerateNonce should generate a unique string
- * @access public
- * @return void
- */
- public function testUniqueNonce() {
- $values = array();
- foreach (range(1,100) as $i) {
- $val = $this->oauth->generateNonce();
- $this->assertFalse(in_array($val, $values), 'Generated nonce should be unique');
- $values[] = $val;
- }
- }
-
- public function testAddGetParams() {
- $url = 'http://www.sometestsite.com/';
- $data = array(
- 'keyA' => 'Some Value',
- 'keyC' => 'some other value',
- 'keyB' => 'yet another value',
- );
-
- $this->assertEqual(
- 'keyA=Some%20Value&keyB=yet%20another%20value&keyC=some%20other%20value',
- $this->oauth->buildData($data));
- }
-
- /**
- * testUniqueNonceSameTime
- *
- * GenerateNonce should generate unique strings, even with the same timestamp
- * @access public
- * @return void
- */
- public function testUniqueNonceSameTime() {
- $time = time();
- $values = array();
- foreach (range(1,100) as $i) {
- $val = $this->oauth->generateNonce($time);
- $this->assertFalse(in_array($val, $values), 'Generated nonce should be unique,'.
- ' even with identical timestamp');
- $values[] = $val;
- }
- }
-
- /**
- * generateTimestamp
- *
- * Ensure generateTimestamp returns a time in epoch seconds.
- * @access public
- * @return void
- */
- public function testGenerateTimestamp() {
- $time = $this->oauth->generateTimestamp();
- $this->assertTrue(is_int($time), 'Timestamp must be an integer');
- $this->assertTrue($time > 0, 'Timestamp must be positive.');
- $this->assertTrue($this->oauth->generateTimestamp() >= $time,
- 'Multiple calls to generateTimestamp should always be equal or greater.');
- }
-
- /**
- * testCreateSignature
- *
- * Test that a new signature is generated based on the data
- * @access public
- * @return void
- */
- public function testCreateSignature() {
- $sigBase = '342refd435gdfxw354xfbw364fdg'; // Random string
- $sigKey = 'gdgdfet4gdffgd4etgr'; // Random string as well
- $signature = $this->oauth->createSignature($sigBase, $sigKey);
- $this->assertTrue($signature, 'Returns a valid signature');
- $this->assertTrue(strpos($signature, $sigBase) === false, 'Signature does not contain base');
- $this->assertTrue(strpos($signature, $sigKey) === false, 'Signature does not contain key');
- }
-
- /**
- * testCreateSignatureUniqueness
- *
- * Verify that signatures are unique
- * @access public
- * @return void
- */
- public function testCreateSignatureUniqueness() {
- $sigBase = '342refd435gdfxw354xfbw364fdg'; // Random string
- $sigKey = 'gdgdfet4gdffgd4etgr'; // Random string as well
- $signature = $this->oauth->createSignature($sigBase, $sigKey);
- $signature2 = $this->oauth->createSignature($sigBase, $sigKey);
- $this->assertEqual($signature, $signature2, 'Signatures with same parameters are identical.');
- $sigKey = $sigKey.'1';
-
- $sig3 = $this->oauth->createSignature($sigBase, $sigKey);
- $this->assertNotEqual($signature, $sig3, 'Changing key creates different signature');
- }
-
-
- /**
- * testGetVersion
- *
- * Tests that the default OAuth version is currently 1.0
- * @access public
- * @return void
- */
- public function testGetVersion() {
- $version = $this->oauth->version;
- $this->assertEqual($version, '1.0', 'Default version is 1.0');
- }
-
- /**
- * testOAuthUser
- *
- * Tests the the OAuthUser class exists and has all its necessary data
- * @access public
- * @return void
- */
- public function testOAuthUser() {
- $user = new OAuthUser();
-
- $this->assertFalse($user->requestToken);
- $this->assertFalse($user->tokenSecret);
- $this->assertFalse($user->authorizedToken);
- $this->assertFalse($user->accessToken);
- }
-
- /**
- * generateOAuthUser
- *
- * Generate a mock OAuth user
- *
- * @access protected
- * @return void
- */
- protected function generateOAuthUser() {
- $data = array(
- 'token' => 'authorized token',
- 'secret' => 'abcdefg',
- );
-
- $user = new OAuthUser();
- $user->accessToken = $data['token'];
- $user->tokenSecret = $data['secret'];
-
- return array($user, $data);
- }
-
- /**
- * testCreatSignatureKey
- *
- * Test that signature key is generated correctly
- * @access public
- * @return void
- */
- public function testCreatSignatureKey() {
- list($user, $data) = $this->generateOAuthUser();
- $this->oauth->user = $user;
-
- $sigKey = $this->oauth->createSignatureKey();
- $this->assertEqual('CONSUMERSECRET&abcdefg', $sigKey); //, 'Signature key generated matches');
- }
-
- /**
- * testGetOAuthRequestData
- *
- * @access public
- * @return void
- */
- public function testGetOAuthRequestData() {
- $this->oauth->user = new OAuthUser();
- $data = $this->oauth->getOAuthRequestData();
- $tempData = array(
- 'oauth_consumer_key' => 'consumer_key',
- 'oauth_token' => '',
- 'oauth_signature_method' => 'HMAC-SHA1',
- 'oauth_version' => '1.0');
-
- // Check that timestamp and nonce are set.
- $this->assertTrue(!empty($data['oauth_timestamp']));
- $this->assertTrue(!empty($data['oauth_nonce']));
-
- // Remove those two items, since they are always unique
- unset($data['oauth_timestamp']);
- unset($data['oauth_nonce']);
-
- ksort($data);
- ksort($tempData);
-
- $this->assertIdentical($data, $tempData, 'Aside from timestamp and nonce, the rest should be identical');
- }
-
- public function generateRequestData() {
- list($user, $data) = $this->generateOAuthUser();
- $this->oauth->user = $user;
-
- $requestData = array(
- 'key1' => 'value1',
- 'key2' => 'value2',
- 'key3' => 'value3');
-
- $mergeData = $this->oauth->mergeOAuthData($requestData);
- return array($mergeData, $requestData);
- }
-
- public function testMergeOAuthData() {
- list($mergeData, $requestData) = $this->generateRequestData();
- $this->assertEqual($mergeData['key1'], $requestData['key1']);
- $this->assertEqual($mergeData['oauth_consumer_key'], $this->oauth->consumerKey);
- }
-
- public function testCreateSignatureBase() {
- list($mergeData, $requestData) = $this->generateRequestData();
- $method = 'GET';
- $url = 'http://www.someservice.com/chicken-nuggets';
-
- $baseString = $this->oauth->createSignatureBase($method, $url, $mergeData);
- $this->assertTrue($baseString);
- $this->assertTrue(strpos($baseString, $method) !== false);
- $this->assertTrue(strpos($baseString, urlencode($url))!== false);
- }
-
- public function testSignRequest() {
- list($data, $requestData) = $this->generateRequestData();
- $method = 'GET';
- $url = 'http://www.someservice.com/chicken-nuggets';
-
- $signedData = $this->oauth->signRequest($method, $url, $data);
- foreach ($data as $key => $val) {
- $this->assertEqual($signedData[$key], $val, 'Signed data has correct value for "'.$key.'"');
- }
-
- $this->assertTrue(!empty($signedData['oauth_signature']));
- }
-
- /**
- * testPrepareRequest
- *
- * @access public
- * @return void
- */
- public function testPrepareRequest() {
- list($data, $requestData) = $this->generateRequestData();
- $method = 'GET';
- $url = 'http://www.someservice.com/chicken-nuggets';
-
- $signedData = $this->oauth->prepareRequest($method, $url, $requestData);
-
- // Test that a nonce and timestamp was generated, then remove the one from our base data so that we
- // don't try to compare the two. They should still be different.
- $this->assertTrue(!empty($signedData['oauth_nonce']), 'Verify nonce was generated');
- $this->assertTrue(!empty($signedData['oauth_timestamp']), 'Verify nonce was generated');
- unset($data['oauth_nonce']);
- unset($data['oauth_timestamp']);
-
- foreach ($data as $key => $val) {
- $this->assertEqual($signedData[$key], $val, 'Signed data has correct value for "'.$key.'"');
- }
-
- $this->assertTrue(!empty($signedData['oauth_signature']));
- }
-
- /**
- * testParseResponse
- *
- * @access public
- * @return void
- */
- public function testParseResponse() {
- $response = new Object();
- $response->body = 'oauth_token=oTkBjHdPYyP7j13RffGpllNhktOR775h6jk48D1cu8Y&oauth_token_secret=GRRa1E7MMm526nql1hETKHMu2BvAXpvHaCu332TPAJ4&oauth_callback_confirmed=true';
- $data = $this->oauth->parseResponse($response);
- $dataShouldBe = array(
- 'oauth_token' => 'oTkBjHdPYyP7j13RffGpllNhktOR775h6jk48D1cu8Y',
- 'oauth_token_secret' => 'GRRa1E7MMm526nql1hETKHMu2BvAXpvHaCu332TPAJ4',
- 'oauth_callback_confirmed' => 'true',
- );
- $this->assertIdentical($data, $dataShouldBe, 'Data is parsed correctly.');
- }
-
-}
-?>
|