campaign_monitor 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +3 -0
- data/MIT-LICENSE +20 -0
- data/README +30 -0
- data/TODO +3 -0
- data/doc/classes/CMCampaignSummary.html +170 -0
- data/doc/classes/CMCampaignSummary.src/M000003.html +22 -0
- data/doc/classes/CMClient.html +111 -0
- data/doc/classes/CMResult.html +155 -0
- data/doc/classes/CMResult.src/M000004.html +19 -0
- data/doc/classes/CampaignMonitor.html +355 -0
- data/doc/classes/CampaignMonitor.src/M000001.html +20 -0
- data/doc/classes/CampaignMonitor.src/M000002.html +20 -0
- data/doc/classes/CampaignMonitor.src/M000003.html +19 -0
- data/doc/classes/CampaignMonitor.src/M000004.html +20 -0
- data/doc/classes/CampaignMonitor.src/M000005.html +18 -0
- data/doc/classes/CampaignMonitor.src/M000006.html +18 -0
- data/doc/classes/CampaignMonitor.src/M000007.html +23 -0
- data/doc/classes/CampaignMonitor.src/M000008.html +23 -0
- data/doc/classes/CampaignMonitor.src/M000009.html +23 -0
- data/doc/classes/CampaignMonitor.src/M000010.html +19 -0
- data/doc/classes/CampaignMonitor.src/M000011.html +19 -0
- data/doc/classes/CampaignMonitor.src/M000012.html +18 -0
- data/doc/classes/CampaignMonitor.src/M000013.html +18 -0
- data/doc/classes/CampaignMonitor.src/M000014.html +18 -0
- data/doc/classes/CampaignMonitor.src/M000015.html +19 -0
- data/doc/classes/CampaignMonitor.src/M000016.html +18 -0
- data/doc/classes/CampaignMonitor.src/M000017.html +18 -0
- data/doc/classes/CampaignMonitor.src/M000018.html +18 -0
- data/doc/classes/CampaignMonitor.src/M000019.html +18 -0
- data/doc/classes/CampaignMonitor.src/M000020.html +18 -0
- data/doc/classes/CampaignMonitor.src/M000021.html +18 -0
- data/doc/classes/CampaignMonitor.src/M000022.html +18 -0
- data/doc/classes/CampaignMonitor.src/M000023.html +18 -0
- data/doc/classes/CampaignMonitor.src/M000024.html +29 -0
- data/doc/classes/CampaignMonitor.src/M000025.html +19 -0
- data/doc/classes/CampaignMonitor.src/M000026.html +21 -0
- data/doc/classes/CampaignMonitor.src/M000027.html +20 -0
- data/doc/classes/CampaignMonitor.src/M000028.html +19 -0
- data/doc/classes/CampaignMonitor.src/M000029.html +20 -0
- data/doc/classes/CampaignMonitor.src/M000030.html +18 -0
- data/doc/classes/CampaignMonitor.src/M000031.html +18 -0
- data/doc/classes/CampaignMonitor.src/M000032.html +23 -0
- data/doc/classes/CampaignMonitor.src/M000033.html +23 -0
- data/doc/classes/CampaignMonitor.src/M000034.html +23 -0
- data/doc/classes/CampaignMonitor.src/M000035.html +19 -0
- data/doc/classes/CampaignMonitor/Campaign.html +387 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000027.html +22 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000028.html +22 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000029.html +23 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000030.html +23 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000031.html +23 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000032.html +23 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000033.html +18 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000034.html +18 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000035.html +18 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000036.html +18 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000037.html +18 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000053.html +22 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000054.html +23 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000055.html +23 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000056.html +23 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000057.html +23 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000058.html +18 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000059.html +18 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000060.html +18 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000061.html +18 -0
- data/doc/classes/CampaignMonitor/Campaign.src/M000062.html +18 -0
- data/doc/classes/CampaignMonitor/Client.html +226 -0
- data/doc/classes/CampaignMonitor/Client.src/M000016.html +20 -0
- data/doc/classes/CampaignMonitor/Client.src/M000017.html +20 -0
- data/doc/classes/CampaignMonitor/Client.src/M000018.html +23 -0
- data/doc/classes/CampaignMonitor/Client.src/M000019.html +23 -0
- data/doc/classes/CampaignMonitor/Client.src/M000042.html +20 -0
- data/doc/classes/CampaignMonitor/Client.src/M000043.html +23 -0
- data/doc/classes/CampaignMonitor/Client.src/M000044.html +23 -0
- data/doc/classes/CampaignMonitor/List.html +308 -0
- data/doc/classes/CampaignMonitor/List.src/M000021.html +20 -0
- data/doc/classes/CampaignMonitor/List.src/M000022.html +20 -0
- data/doc/classes/CampaignMonitor/List.src/M000023.html +19 -0
- data/doc/classes/CampaignMonitor/List.src/M000024.html +19 -0
- data/doc/classes/CampaignMonitor/List.src/M000025.html +23 -0
- data/doc/classes/CampaignMonitor/List.src/M000026.html +23 -0
- data/doc/classes/CampaignMonitor/List.src/M000027.html +23 -0
- data/doc/classes/CampaignMonitor/List.src/M000047.html +20 -0
- data/doc/classes/CampaignMonitor/List.src/M000048.html +19 -0
- data/doc/classes/CampaignMonitor/List.src/M000049.html +19 -0
- data/doc/classes/CampaignMonitor/List.src/M000050.html +23 -0
- data/doc/classes/CampaignMonitor/List.src/M000051.html +23 -0
- data/doc/classes/CampaignMonitor/List.src/M000052.html +23 -0
- data/doc/classes/CampaignMonitor/Result.html +162 -0
- data/doc/classes/CampaignMonitor/Result.src/M000020.html +19 -0
- data/doc/classes/CampaignMonitor/Result.src/M000021.html +19 -0
- data/doc/classes/CampaignMonitor/Result.src/M000046.html +19 -0
- data/doc/classes/CampaignMonitor/Subscriber.html +212 -0
- data/doc/classes/CampaignMonitor/Subscriber.src/M000012.html +21 -0
- data/doc/classes/CampaignMonitor/Subscriber.src/M000013.html +21 -0
- data/doc/classes/CampaignMonitor/Subscriber.src/M000014.html +19 -0
- data/doc/classes/CampaignMonitor/Subscriber.src/M000015.html +19 -0
- data/doc/classes/CampaignMonitor/Subscriber.src/M000038.html +21 -0
- data/doc/classes/CampaignMonitor/Subscriber.src/M000039.html +19 -0
- data/doc/classes/CampaignMonitor/Subscriber.src/M000040.html +19 -0
- data/doc/classes/CampaignMonitor/SubscriberBounce.html +166 -0
- data/doc/classes/CampaignMonitor/SubscriberBounce.src/M000019.html +20 -0
- data/doc/classes/CampaignMonitor/SubscriberBounce.src/M000020.html +20 -0
- data/doc/classes/CampaignMonitor/SubscriberBounce.src/M000045.html +20 -0
- data/doc/classes/CampaignMonitor/SubscriberClick.html +166 -0
- data/doc/classes/CampaignMonitor/SubscriberClick.src/M000010.html +20 -0
- data/doc/classes/CampaignMonitor/SubscriberClick.src/M000011.html +20 -0
- data/doc/classes/CampaignMonitor/SubscriberClick.src/M000036.html +20 -0
- data/doc/classes/CampaignMonitor/SubscriberOpen.html +166 -0
- data/doc/classes/CampaignMonitor/SubscriberOpen.src/M000011.html +20 -0
- data/doc/classes/CampaignMonitor/SubscriberOpen.src/M000012.html +20 -0
- data/doc/classes/CampaignMonitor/SubscriberOpen.src/M000037.html +20 -0
- data/doc/classes/CampaignMonitor/SubscriberUnsubscribe.html +161 -0
- data/doc/classes/CampaignMonitor/SubscriberUnsubscribe.src/M000015.html +19 -0
- data/doc/classes/CampaignMonitor/SubscriberUnsubscribe.src/M000016.html +19 -0
- data/doc/classes/CampaignMonitor/SubscriberUnsubscribe.src/M000041.html +19 -0
- data/doc/classes/CampaignMonitorTest.html +137 -0
- data/doc/classes/CampaignMonitorTest.src/M000001.html +18 -0
- data/doc/classes/Hash.html +137 -0
- data/doc/classes/Hash.src/M000002.html +18 -0
- data/doc/classes/Symbol.html +143 -0
- data/doc/classes/Symbol.src/M000001.html +18 -0
- data/doc/created.rid +1 -0
- data/doc/files/campaign_monitor_old_rb.html +119 -0
- data/doc/files/init_rb.html +108 -0
- data/doc/files/install_rb.html +101 -0
- data/doc/files/lib/campaign_monitor_rb.html +184 -0
- data/doc/files/test/campaign_monitor_test_rb.html +101 -0
- data/doc/fr_class_index.html +37 -0
- data/doc/fr_file_index.html +28 -0
- data/doc/fr_method_index.html +63 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/campaign_monitor.rb +503 -0
- data/test/campaign_monitor_test.rb +6 -0
- metadata +175 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>http_get (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/campaign_monitor.rb, line 86</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">http_get</span>(<span class="ruby-identifier">url</span>)
|
|
15
|
+
<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get_response</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">url</span>)).<span class="ruby-identifier">body</span>.<span class="ruby-identifier">to_s</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>method_missing (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/campaign_monitor.rb, line 92</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">method_id</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">params</span>)
|
|
15
|
+
<span class="ruby-identifier">request</span>(<span class="ruby-identifier">method_id</span>.<span class="ruby-identifier">id2name</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/_/</span>, <span class="ruby-value str">'.'</span>), <span class="ruby-identifier">params</span>[<span class="ruby-value">0</span>])
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>clients (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/campaign_monitor.rb, line 105</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clients</span>
|
|
15
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-constant">User_GetClients</span>()
|
|
16
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">response</span>[<span class="ruby-value str">"Code"</span>].<span class="ruby-identifier">to_i</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
|
17
|
+
<span class="ruby-identifier">response</span>[<span class="ruby-value str">"Client"</span>].<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">c</span>[<span class="ruby-value str">"ClientID"</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">c</span>[<span class="ruby-value str">"Name"</span>])}
|
|
18
|
+
<span class="ruby-keyword kw">else</span>
|
|
19
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-identifier">response</span>[<span class="ruby-value str">"Code"</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">" - "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">response</span>[<span class="ruby-value str">"Message"</span>]
|
|
20
|
+
<span class="ruby-keyword kw">end</span>
|
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>campaigns (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/campaign_monitor.rb, line 123</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">campaigns</span>(<span class="ruby-identifier">client_id</span>)
|
|
15
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-constant">Client_GetCampaigns</span>(<span class="ruby-value str">"ClientID"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">client_id</span>)
|
|
16
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">response</span>[<span class="ruby-value str">"Code"</span>].<span class="ruby-identifier">to_i</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
|
17
|
+
<span class="ruby-identifier">response</span>[<span class="ruby-value str">"Campaign"</span>].<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-constant">Campaign</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">c</span>[<span class="ruby-value str">"CampaignID"</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">c</span>[<span class="ruby-value str">"Subject"</span>], <span class="ruby-identifier">c</span>[<span class="ruby-value str">"SentDate"</span>], <span class="ruby-identifier">c</span>[<span class="ruby-value str">"TotalRecipients"</span>].<span class="ruby-identifier">to_i</span>)}
|
|
18
|
+
<span class="ruby-keyword kw">else</span>
|
|
19
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-identifier">response</span>[<span class="ruby-value str">"Code"</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">" - "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">response</span>[<span class="ruby-value str">"Message"</span>]
|
|
20
|
+
<span class="ruby-keyword kw">end</span>
|
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>lists (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/campaign_monitor.rb, line 141</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lists</span>(<span class="ruby-identifier">client_id</span>)
|
|
15
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-constant">Client_GetLists</span>(<span class="ruby-value str">"ClientID"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">client_id</span>)
|
|
16
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">response</span>[<span class="ruby-value str">"Code"</span>].<span class="ruby-identifier">to_i</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
|
17
|
+
<span class="ruby-identifier">response</span>[<span class="ruby-value str">"List"</span>].<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-constant">List</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">l</span>[<span class="ruby-value str">"ListID"</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">l</span>[<span class="ruby-value str">"Name"</span>])}
|
|
18
|
+
<span class="ruby-keyword kw">else</span>
|
|
19
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-identifier">response</span>[<span class="ruby-value str">"Code"</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">" - "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">response</span>[<span class="ruby-value str">"Message"</span>]
|
|
20
|
+
<span class="ruby-keyword kw">end</span>
|
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>add_subscriber (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/campaign_monitor.rb, line 159</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_subscriber</span>(<span class="ruby-identifier">list_id</span>, <span class="ruby-identifier">email</span>, <span class="ruby-identifier">name</span>)
|
|
15
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-constant">Subscriber_Add</span>(<span class="ruby-value str">"ListID"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">list_id</span>, <span class="ruby-value str">"Email"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">email</span>, <span class="ruby-value str">"Name"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">name</span>)
|
|
16
|
+
<span class="ruby-constant">Result</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">response</span>[<span class="ruby-value str">"Message"</span>], <span class="ruby-identifier">response</span>[<span class="ruby-value str">"Code"</span>].<span class="ruby-identifier">to_i</span>)
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>subscriber_unsubscribe (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File campaign_monitor_old.rb, line 114</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">subscriber_unsubscribe</span>(<span class="ruby-identifier">list_id</span>, <span class="ruby-identifier">email</span>)
|
|
15
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-identifier">request</span>(<span class="ruby-identifier">get_path</span>(<span class="ruby-value str">'Subscriber.Unsubscribe'</span>) <span class="ruby-operator">+</span> <span class="ruby-node">"&ListID=#{list_id}&Email=#{email}"</span>)
|
|
16
|
+
<span class="ruby-constant">CMResult</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">result</span>[<span class="ruby-value str">"Result"</span>][<span class="ruby-value str">"Message"</span>], <span class="ruby-identifier">result</span>[<span class="ruby-value str">"Result"</span>][<span class="ruby-value str">"Code"</span>].<span class="ruby-identifier">to_i</span>)
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>subscriber_get_active (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File campaign_monitor_old.rb, line 119</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">subscriber_get_active</span>(<span class="ruby-identifier">list_id</span>, <span class="ruby-identifier">since_date</span>)
|
|
15
|
+
<span class="ruby-identifier">records</span> <span class="ruby-value str">"Subscriber"</span>, <span class="ruby-identifier">get_path</span>(<span class="ruby-value str">'Subscribers.GetActive'</span>) <span class="ruby-operator">+</span> <span class="ruby-node">"&ListID=#{list_id}&Date="</span> <span class="ruby-operator">+</span> <span class="ruby-constant">CGI</span><span class="ruby-operator">::</span><span class="ruby-identifier">escape</span>(<span class="ruby-identifier">since_date</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">"%Y-%m-%d %H:%M:%S"</span>))
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>subscriber_get_unsubscribed (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File campaign_monitor_old.rb, line 123</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">subscriber_get_unsubscribed</span>(<span class="ruby-identifier">list_id</span>, <span class="ruby-identifier">since_date</span>)
|
|
15
|
+
<span class="ruby-identifier">records</span> <span class="ruby-value str">"Subscriber"</span>, <span class="ruby-identifier">get_path</span>(<span class="ruby-value str">'Subscribers.GetUnsubscribed'</span>) <span class="ruby-operator">+</span> <span class="ruby-node">"&ListID=#{list_id}&Date="</span> <span class="ruby-operator">+</span> <span class="ruby-constant">CGI</span><span class="ruby-operator">::</span><span class="ruby-identifier">escape</span>(<span class="ruby-identifier">since_date</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">"%Y-%m-%d %H:%M:%S"</span>))
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>subscriber_get_bounced (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File campaign_monitor_old.rb, line 127</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">subscriber_get_bounced</span>(<span class="ruby-identifier">list_id</span>, <span class="ruby-identifier">since_date</span>)
|
|
15
|
+
<span class="ruby-identifier">records</span> <span class="ruby-value str">"Subscriber"</span>, <span class="ruby-identifier">get_path</span>(<span class="ruby-value str">'Subscribers.GetBounced'</span>) <span class="ruby-operator">+</span> <span class="ruby-node">"&ListID=#{list_id}&Date="</span> <span class="ruby-operator">+</span> <span class="ruby-constant">CGI</span><span class="ruby-operator">::</span><span class="ruby-identifier">escape</span>(<span class="ruby-identifier">since_date</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">"%Y-%m-%d %H:%M:%S"</span>))
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>campaign_get_summary (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File campaign_monitor_old.rb, line 134</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">campaign_get_summary</span>(<span class="ruby-identifier">campaign_id</span>)
|
|
15
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-identifier">request</span>(<span class="ruby-identifier">get_path</span>(<span class="ruby-value str">"Campaign.GetSummary"</span>) <span class="ruby-operator">+</span> <span class="ruby-node">"&CampaignID=#{campaign_id}"</span>)
|
|
16
|
+
<span class="ruby-constant">CMCampaignSummary</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">result</span>[<span class="ruby-value str">"anyType"</span>][<span class="ruby-value str">"Recipients"</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">result</span>[<span class="ruby-value str">"anyType"</span>][<span class="ruby-value str">"TotalOpened"</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">result</span>[<span class="ruby-value str">"anyType"</span>][<span class="ruby-value str">"Clicks"</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">result</span>[<span class="ruby-value str">"anyType"</span>][<span class="ruby-value str">"Unsubscribed"</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">result</span>[<span class="ruby-value str">"anyType"</span>][<span class="ruby-value str">"Bounced"</span>].<span class="ruby-identifier">to_i</span>)
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>campaign_get_opens (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File campaign_monitor_old.rb, line 139</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">campaign_get_opens</span>(<span class="ruby-identifier">campaign_id</span>)
|
|
15
|
+
<span class="ruby-identifier">records</span> <span class="ruby-value str">"SubscriberOpen"</span>, <span class="ruby-identifier">get_path</span>(<span class="ruby-value str">"Campaign.GetOpens"</span>) <span class="ruby-operator">+</span> <span class="ruby-node">"&CampaignID=#{campaign_id}"</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>campaign_get_bounces (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File campaign_monitor_old.rb, line 143</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">campaign_get_bounces</span>(<span class="ruby-identifier">campaign_id</span>)
|
|
15
|
+
<span class="ruby-identifier">records</span> <span class="ruby-value str">"SubscriberBounce"</span>, <span class="ruby-identifier">get_path</span>(<span class="ruby-value str">"Campaign.GetBounces"</span>) <span class="ruby-operator">+</span> <span class="ruby-node">"&CampaignID=#{campaign_id}"</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>campaign_get_subscriber_clicks (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File campaign_monitor_old.rb, line 147</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">campaign_get_subscriber_clicks</span>(<span class="ruby-identifier">campaign_id</span>)
|
|
15
|
+
<span class="ruby-identifier">records</span> <span class="ruby-value str">"SubscriberClick"</span>, <span class="ruby-identifier">get_path</span>(<span class="ruby-value str">"Campaign.GetClicks"</span>) <span class="ruby-operator">+</span> <span class="ruby-node">"&CampaignID=#{campaign_id}"</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>campaign_get_unsubscribes (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File campaign_monitor_old.rb, line 151</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">campaign_get_unsubscribes</span>(<span class="ruby-identifier">campaign_id</span>)
|
|
15
|
+
<span class="ruby-identifier">records</span> <span class="ruby-value str">"SubscriberUnsubscribe"</span>, <span class="ruby-identifier">get_path</span>(<span class="ruby-value str">'Campaign.GetUnsubscribes'</span>) <span class="ruby-operator">+</span> <span class="ruby-node">"&CampaignID=#{campaign_id}"</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>client_get_lists (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File campaign_monitor_old.rb, line 157</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">client_get_lists</span>(<span class="ruby-identifier">client_id</span>)
|
|
15
|
+
<span class="ruby-identifier">records</span> <span class="ruby-value str">"List"</span>, <span class="ruby-identifier">get_path</span>(<span class="ruby-value str">'Client.GetLists'</span>) <span class="ruby-operator">+</span> <span class="ruby-node">"&ClientID=#{client_id}"</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>client_get_campaigns (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File campaign_monitor_old.rb, line 161</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">client_get_campaigns</span>(<span class="ruby-identifier">client_id</span>)
|
|
15
|
+
<span class="ruby-identifier">records</span> <span class="ruby-value str">"Campaign"</span>, <span class="ruby-identifier">get_path</span>(<span class="ruby-value str">'Client.GetCampaigns'</span>) <span class="ruby-operator">+</span> <span class="ruby-node">"&ClientID=#{client_id}"</span>
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>user_get_clients (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File campaign_monitor_old.rb, line 169</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">user_get_clients</span>
|
|
15
|
+
<span class="ruby-identifier">records</span> <span class="ruby-value str">"Client"</span>, <span class="ruby-identifier">get_path</span>(<span class="ruby-value str">'User.GetClients'</span>)
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>user_get_system_date (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File campaign_monitor_old.rb, line 173</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">user_get_system_date</span>
|
|
15
|
+
<span class="ruby-identifier">request</span>(<span class="ruby-identifier">get_path</span>(<span class="ruby-value str">'User.GetSystemDate'</span>))[<span class="ruby-value str">"anyType"</span>]
|
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>request (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File campaign_monitor_old.rb, line 180</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">request</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">parameters</span> = {}, <span class="ruby-identifier">second_try</span> = <span class="ruby-keyword kw">false</span>)
|
|
15
|
+
<span class="ruby-comment cmt">#response = post(path, convert_body(parameters), "Content-Type" => content_type)</span>
|
|
16
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">path</span>)
|
|
17
|
+
|
|
18
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">code</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-operator">/</span> <span class="ruby-value">100</span> <span class="ruby-operator">==</span> <span class="ruby-value">2</span>
|
|
19
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-constant">XmlSimple</span>.<span class="ruby-identifier">xml_in</span>(<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>, <span class="ruby-value str">'keeproot'</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>, <span class="ruby-value str">'NoAttr'</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>, <span class="ruby-value str">'ForceArray'</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">false</span>)
|
|
20
|
+
<span class="ruby-comment cmt">#typecast_value(result)</span>
|
|
21
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">code</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"302"</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">second_try</span>
|
|
22
|
+
<span class="ruby-identifier">connect!</span>(<span class="ruby-ivar">@url</span>, <span class="ruby-operator">!</span><span class="ruby-ivar">@use_ssl</span>)
|
|
23
|
+
<span class="ruby-identifier">request</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">parameters</span>, <span class="ruby-keyword kw">true</span>)
|
|
24
|
+
<span class="ruby-keyword kw">else</span>
|
|
25
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"#{response.message} (#{response.code})"</span>
|
|
26
|
+
<span class="ruby-keyword kw">end</span>
|
|
27
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
28
|
+
</body>
|
|
29
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>record (CampaignMonitor)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre><span class="ruby-comment cmt"># File campaign_monitor_old.rb, line 197</span>
|
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">record</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">parameters</span>={})
|
|
15
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-identifier">get</span>(<span class="ruby-identifier">path</span>)
|
|
16
|
+
(<span class="ruby-identifier">result</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">Record</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">result</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">first</span>, <span class="ruby-identifier">result</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">first</span>) <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
|
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|