locaweb-emailmarketing 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/.rspec +1 -0
- data/Gemfile +4 -0
- data/README.md +133 -0
- data/Rakefile +1 -0
- data/lib/locaweb-emailmarketing.rb +12 -0
- data/lib/locaweb-emailmarketing/adapters.rb +1 -0
- data/lib/locaweb-emailmarketing/adapters/http_request_adapter.rb +38 -0
- data/lib/locaweb-emailmarketing/client.rb +60 -0
- data/lib/locaweb-emailmarketing/clients.rb +14 -0
- data/lib/locaweb-emailmarketing/clients/account_client.rb +22 -0
- data/lib/locaweb-emailmarketing/clients/base_client.rb +52 -0
- data/lib/locaweb-emailmarketing/clients/campaign_client.rb +13 -0
- data/lib/locaweb-emailmarketing/clients/contact_client.rb +12 -0
- data/lib/locaweb-emailmarketing/clients/contact_import_client.rb +19 -0
- data/lib/locaweb-emailmarketing/clients/custom_field_client.rb +12 -0
- data/lib/locaweb-emailmarketing/clients/domain_client.rb +12 -0
- data/lib/locaweb-emailmarketing/clients/list_client.rb +12 -0
- data/lib/locaweb-emailmarketing/clients/message_client.rb +13 -0
- data/lib/locaweb-emailmarketing/clients/report_client.rb +41 -0
- data/lib/locaweb-emailmarketing/clients/sender_client.rb +15 -0
- data/lib/locaweb-emailmarketing/clients/template_client.rb +12 -0
- data/lib/locaweb-emailmarketing/clients/unsubscribe_reason_client.rb +13 -0
- data/lib/locaweb-emailmarketing/lib/hash.rb +9 -0
- data/lib/locaweb-emailmarketing/libs.rb +1 -0
- data/lib/locaweb-emailmarketing/version.rb +5 -0
- data/locaweb-emailmarketing.gemspec +30 -0
- data/spec/fixtures/cassettes/accounts_all.yml +74 -0
- data/spec/fixtures/cassettes/accounts_get.yml +77 -0
- data/spec/fixtures/cassettes/accounts_update.yml +124 -0
- data/spec/fixtures/cassettes/custom_field_all.yml +150 -0
- data/spec/fixtures/cassettes/custom_field_create.yml +263 -0
- data/spec/fixtures/cassettes/custom_field_destroy.yml +187 -0
- data/spec/fixtures/cassettes/custom_field_get.yml +146 -0
- data/spec/fixtures/cassettes/custom_field_update.yml +265 -0
- data/spec/fixtures/cassettes/reports_bounces.yml +75 -0
- data/spec/fixtures/cassettes/reports_clicks.yml +74 -0
- data/spec/fixtures/cassettes/reports_links.yml +73 -0
- data/spec/fixtures/cassettes/reports_openings.yml +74 -0
- data/spec/fixtures/cassettes/reports_overview.yml +75 -0
- data/spec/fixtures/cassettes/reports_uniq_openings.yml +74 -0
- data/spec/locaweb-emailmarketing/adapters/http_request_adapter_spec.rb +63 -0
- data/spec/locaweb-emailmarketing/client_spec.rb +14 -0
- data/spec/locaweb-emailmarketing/clients/account_client_spec.rb +37 -0
- data/spec/locaweb-emailmarketing/clients/base_client_spec.rb +77 -0
- data/spec/locaweb-emailmarketing/clients/campaign_client_spec.rb +10 -0
- data/spec/locaweb-emailmarketing/clients/contact_client_spec.rb +10 -0
- data/spec/locaweb-emailmarketing/clients/contact_import_client_spec.rb +9 -0
- data/spec/locaweb-emailmarketing/clients/custom_field_client_spec.rb +10 -0
- data/spec/locaweb-emailmarketing/clients/domains_client_spec.rb +10 -0
- data/spec/locaweb-emailmarketing/clients/list_client_spec.rb +10 -0
- data/spec/locaweb-emailmarketing/clients/message_client_spec.rb +10 -0
- data/spec/locaweb-emailmarketing/clients/report_client_spec.rb +70 -0
- data/spec/locaweb-emailmarketing/clients/sender_client_spec.rb +9 -0
- data/spec/locaweb-emailmarketing/clients/template_client_spec.rb +10 -0
- data/spec/locaweb-emailmarketing/clients/unsubscribe_reason_client_spec.rb +10 -0
- data/spec/locaweb-emailmarketing/lib/hash_spec.rb +23 -0
- data/spec/spec_helper.rb +21 -0
- data/spec/support/base_client_examples.rb +100 -0
- metadata +193 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
module Locaweb
|
2
|
+
module Emailmarketing
|
3
|
+
class MessageClient < BaseClient
|
4
|
+
def initialize(http_request_adapter, account_id)
|
5
|
+
super
|
6
|
+
resource_name "messages"
|
7
|
+
required_keys = {required: [:domain_id, :html_body, :list_ids, :name, :sender_name, :sender, :subject, :scheduled_to], optional: [:text_body] }
|
8
|
+
required_keys_to_create required_keys
|
9
|
+
required_keys_to_update({required: [], optional: required_keys[:optional] + required_keys[:required] })
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Locaweb
|
2
|
+
module Emailmarketing
|
3
|
+
class ReportClient
|
4
|
+
def initialize(http_request_adapter, account_id)
|
5
|
+
@http_request_adapter = http_request_adapter
|
6
|
+
@account_id = account_id
|
7
|
+
@resource_name = "messages"
|
8
|
+
end
|
9
|
+
|
10
|
+
def overview(message_id)
|
11
|
+
do_report_request message_id, "overview"
|
12
|
+
end
|
13
|
+
|
14
|
+
def openings(message_id)
|
15
|
+
do_report_request message_id, "openings"
|
16
|
+
end
|
17
|
+
|
18
|
+
def uniq_openings(message_id)
|
19
|
+
do_report_request message_id, "uniq_openings"
|
20
|
+
end
|
21
|
+
|
22
|
+
def links(message_id)
|
23
|
+
do_report_request message_id, "links"
|
24
|
+
end
|
25
|
+
|
26
|
+
def clicks(message_id)
|
27
|
+
do_report_request message_id, "clicks"
|
28
|
+
end
|
29
|
+
|
30
|
+
def bounces(message_id)
|
31
|
+
do_report_request message_id, "bounces"
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def do_report_request(message_id, report_name)
|
37
|
+
@http_request_adapter.get "accounts/#{@account_id}/#{@resource_name}/#{message_id}/#{report_name}"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Locaweb
|
2
|
+
module Emailmarketing
|
3
|
+
class SenderClient < BaseClient
|
4
|
+
def initialize(http_request_adapter, account_id)
|
5
|
+
super
|
6
|
+
resource_name "senders"
|
7
|
+
required_keys_to_create ({ required: [:email], optional: [] })
|
8
|
+
end
|
9
|
+
|
10
|
+
def update(*args)
|
11
|
+
raise(NotImplementedError, "Unavailable action to this resource")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Locaweb
|
2
|
+
module Emailmarketing
|
3
|
+
class TemplateClient < BaseClient
|
4
|
+
def initialize(http_request_adapter, account_id)
|
5
|
+
super
|
6
|
+
resource_name "templates"
|
7
|
+
required_keys_to_create({ required: [:name, :html_body, :text_body], optional: [] })
|
8
|
+
required_keys_to_update({ required: [], optional: [:name, :html_body, :text_body] })
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Locaweb
|
2
|
+
module Emailmarketing
|
3
|
+
class UnsubscribeReasonClient < BaseClient
|
4
|
+
def initialize(http_request_adapter, account_id)
|
5
|
+
super
|
6
|
+
resource_name "unsubscribe_reasons"
|
7
|
+
required_keys = { required: [:name], optional: [:name] }
|
8
|
+
required_keys_to_create required_keys
|
9
|
+
required_keys_to_update required_keys
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class Hash
|
2
|
+
def assert_required_keys(params)
|
3
|
+
params[:required] ||= []
|
4
|
+
params[:optional] ||= []
|
5
|
+
assert_valid_keys params[:required] + params[:optional]
|
6
|
+
pending_keys = params[:required] - keys
|
7
|
+
raise(ArgumentError, "Required key(s) not present: #{pending_keys.join(", ")}") unless pending_keys.empty?
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require "locaweb-emailmarketing/lib/hash"
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "locaweb-emailmarketing/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "locaweb-emailmarketing"
|
7
|
+
s.version = Locaweb::Emailmarketing::VERSION
|
8
|
+
s.authors = ["Fabio Perrella"]
|
9
|
+
s.email = ["fabio.perrella@gmail.com"]
|
10
|
+
s.homepage = "https://github.com/fabioperrella/locaweb-emailmarketing"
|
11
|
+
s.summary = %q{APIs for Locaweb EmailMarketing http://emailmarketing.locaweb.com.br/trial}
|
12
|
+
s.description = %q{APIs for Locaweb EmailMarketing http://emailmarketing.locaweb.com.br/trial}
|
13
|
+
|
14
|
+
s.rubyforge_project = "locaweb-emailmarketing"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
|
21
|
+
# specify any dependencies here; for example:
|
22
|
+
s.add_development_dependency "rspec"
|
23
|
+
s.add_development_dependency "pry"
|
24
|
+
s.add_development_dependency "pry-debugger"
|
25
|
+
s.add_development_dependency "webmock", "~> 1.8.11"
|
26
|
+
s.add_development_dependency "vcr"
|
27
|
+
s.add_runtime_dependency "activesupport"
|
28
|
+
s.add_runtime_dependency "rest-client"
|
29
|
+
s.add_runtime_dependency "json"
|
30
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://emailmarketing.locaweb.com.br/api/v1/accounts
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
X-Auth-Token:
|
15
|
+
- Nt5skc1xXsvKKSsyp3Bsx7ABNdJz9pc1uA9kyTdjnJkr
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: !binary |-
|
22
|
+
T0s=
|
23
|
+
headers:
|
24
|
+
!binary "U2VydmVy":
|
25
|
+
- !binary |-
|
26
|
+
bmdpbngvMS4xLjI=
|
27
|
+
!binary "RGF0ZQ==":
|
28
|
+
- !binary |-
|
29
|
+
RnJpLCAxOCBKYW4gMjAxMyAxNzowMDoxNSBHTVQ=
|
30
|
+
!binary "Q29udGVudC1UeXBl":
|
31
|
+
- !binary |-
|
32
|
+
YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
|
33
|
+
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
34
|
+
- !binary |-
|
35
|
+
Y2h1bmtlZA==
|
36
|
+
!binary "Q29ubmVjdGlvbg==":
|
37
|
+
- !binary |-
|
38
|
+
a2VlcC1hbGl2ZQ==
|
39
|
+
!binary "VmFyeQ==":
|
40
|
+
- !binary |-
|
41
|
+
QWNjZXB0LUVuY29kaW5n
|
42
|
+
!binary "U3RhdHVz":
|
43
|
+
- !binary |-
|
44
|
+
MjAwIE9L
|
45
|
+
!binary "WC1VYS1Db21wYXRpYmxl":
|
46
|
+
- !binary |-
|
47
|
+
SUU9RWRnZSxjaHJvbWU9MQ==
|
48
|
+
!binary "RXRhZw==":
|
49
|
+
- !binary |-
|
50
|
+
IjgzNzdkZWIyNjc0YmQ2Yjk5YjNkMzg1NTNjMjIyZWRmIg==
|
51
|
+
!binary "Q2FjaGUtQ29udHJvbA==":
|
52
|
+
- !binary |-
|
53
|
+
bWF4LWFnZT0wLCBwcml2YXRlLCBtdXN0LXJldmFsaWRhdGU=
|
54
|
+
!binary "WC1SZXF1ZXN0LUlk":
|
55
|
+
- !binary |-
|
56
|
+
YWI0YzgzYTcxMGU2YWFlNzVjY2M5OWE1NjM5MjExNTM=
|
57
|
+
!binary "WC1SdW50aW1l":
|
58
|
+
- !binary |-
|
59
|
+
MC4wMDg5OTE=
|
60
|
+
!binary "WC1SYWNrLUNhY2hl":
|
61
|
+
- !binary |-
|
62
|
+
bWlzcw==
|
63
|
+
!binary "Q29udGVudC1FbmNvZGluZw==":
|
64
|
+
- !binary |-
|
65
|
+
Z3ppcA==
|
66
|
+
body:
|
67
|
+
encoding: ASCII-8BIT
|
68
|
+
string: !binary |-
|
69
|
+
H4sIAAAAAAAAAzXKwQqDMBCE4XeZswejSJM8hzcpZWuSEtAocXsoIe/eVXCO
|
70
|
+
3/wFkf16wE4F0cFiaIP2naZ30O5hgumH9pxCAxePfaHfK9HqpeQcaREWS7eN
|
71
|
+
l9WnKH0ECuZvzj4xrGrAG8trVa1/Jl3Hb3cAAAA=
|
72
|
+
http_version:
|
73
|
+
recorded_at: Fri, 18 Jan 2013 17:00:15 GMT
|
74
|
+
recorded_with: VCR 2.3.0
|
@@ -0,0 +1,77 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://emailmarketing.locaweb.com.br/api/v1/accounts/50f8e28abf8d79f935000001
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
X-Auth-Token:
|
15
|
+
- Nt5skc1xXsvKKSsyp3Bsx7ABNdJz9pc1uA9kyTdjnJkr
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: !binary |-
|
22
|
+
T0s=
|
23
|
+
headers:
|
24
|
+
!binary "U2VydmVy":
|
25
|
+
- !binary |-
|
26
|
+
bmdpbngvMS4xLjI=
|
27
|
+
!binary "RGF0ZQ==":
|
28
|
+
- !binary |-
|
29
|
+
RnJpLCAxOCBKYW4gMjAxMyAxNzowMDoxNSBHTVQ=
|
30
|
+
!binary "Q29udGVudC1UeXBl":
|
31
|
+
- !binary |-
|
32
|
+
YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
|
33
|
+
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
34
|
+
- !binary |-
|
35
|
+
Y2h1bmtlZA==
|
36
|
+
!binary "Q29ubmVjdGlvbg==":
|
37
|
+
- !binary |-
|
38
|
+
a2VlcC1hbGl2ZQ==
|
39
|
+
!binary "VmFyeQ==":
|
40
|
+
- !binary |-
|
41
|
+
QWNjZXB0LUVuY29kaW5n
|
42
|
+
!binary "U3RhdHVz":
|
43
|
+
- !binary |-
|
44
|
+
MjAwIE9L
|
45
|
+
!binary "WC1VYS1Db21wYXRpYmxl":
|
46
|
+
- !binary |-
|
47
|
+
SUU9RWRnZSxjaHJvbWU9MQ==
|
48
|
+
!binary "RXRhZw==":
|
49
|
+
- !binary |-
|
50
|
+
ImZmNjI4Y2Y0MDI4Yzc0YjEzMDY4ZTBlMmRhY2U3N2M4Ig==
|
51
|
+
!binary "Q2FjaGUtQ29udHJvbA==":
|
52
|
+
- !binary |-
|
53
|
+
bWF4LWFnZT0wLCBwcml2YXRlLCBtdXN0LXJldmFsaWRhdGU=
|
54
|
+
!binary "WC1SZXF1ZXN0LUlk":
|
55
|
+
- !binary |-
|
56
|
+
MWI2NzFlMmUzNGMyYmM5ZjkxMzAzNzU2MDE0YzgzOTY=
|
57
|
+
!binary "WC1SdW50aW1l":
|
58
|
+
- !binary |-
|
59
|
+
MC4wOTMxNjE=
|
60
|
+
!binary "WC1SYWNrLUNhY2hl":
|
61
|
+
- !binary |-
|
62
|
+
bWlzcw==
|
63
|
+
!binary "Q29udGVudC1FbmNvZGluZw==":
|
64
|
+
- !binary |-
|
65
|
+
Z3ppcA==
|
66
|
+
body:
|
67
|
+
encoding: ASCII-8BIT
|
68
|
+
string: !binary |-
|
69
|
+
H4sIAAAAAAAAA2WPzY6DMAyEX2WVc4sCCC3ktA/Re2QSI6LNTxVMUVXx7nX6
|
70
|
+
s3toTtbniWfmJpwVSnRy6rHpYZx6+z1MQ9vJ8mpxEBjAeZZYDCkulMFA+vHJ
|
71
|
+
wIZjZVKoxswq65azh6uOEJDFlB14xszim51ezGQEQquBGNbtUdbHuv+Sreqk
|
72
|
+
kg0LMtKaoz4Dzdomto/vixXGi0uc5Jf+rT/l+gK+1LqJ10B5xf3hbB0tZWG4
|
73
|
+
yxo4Bc1u0dyMZqFqDpyRL5U/8iAe2F+FGv5mnTHiBv6ZvpElf8P5xadic+Wm
|
74
|
+
3Pc7GUYuQ2QBAAA=
|
75
|
+
http_version:
|
76
|
+
recorded_at: Fri, 18 Jan 2013 17:00:15 GMT
|
77
|
+
recorded_with: VCR 2.3.0
|
@@ -0,0 +1,124 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://emailmarketing.locaweb.com.br/api/v1/accounts/50f8e28abf8d79f935000001
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ! '{"account":{"return_path_domain":"trial3.newssender.com.br"}}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*; q=0.5, application/xml'
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
X-Auth-Token:
|
15
|
+
- Nt5skc1xXsvKKSsyp3Bsx7ABNdJz9pc1uA9kyTdjnJkr
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
Content-Length:
|
19
|
+
- '61'
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 204
|
25
|
+
message: No Content
|
26
|
+
headers:
|
27
|
+
Server:
|
28
|
+
- nginx/1.1.2
|
29
|
+
Date:
|
30
|
+
- Fri, 18 Jan 2013 17:00:15 GMT
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Status:
|
34
|
+
- 204 No Content
|
35
|
+
X-Ua-Compatible:
|
36
|
+
- IE=Edge,chrome=1
|
37
|
+
Cache-Control:
|
38
|
+
- no-cache
|
39
|
+
X-Request-Id:
|
40
|
+
- b97ff961eb1523281c0cf03ed6d3fd14
|
41
|
+
X-Runtime:
|
42
|
+
- '0.079324'
|
43
|
+
X-Rack-Cache:
|
44
|
+
- invalidate, pass
|
45
|
+
body:
|
46
|
+
encoding: US-ASCII
|
47
|
+
string: ''
|
48
|
+
http_version:
|
49
|
+
recorded_at: Fri, 18 Jan 2013 17:00:16 GMT
|
50
|
+
- request:
|
51
|
+
method: get
|
52
|
+
uri: https://emailmarketing.locaweb.com.br/api/v1/accounts/50f8e28abf8d79f935000001
|
53
|
+
body:
|
54
|
+
encoding: US-ASCII
|
55
|
+
string: ''
|
56
|
+
headers:
|
57
|
+
Accept:
|
58
|
+
- application/json
|
59
|
+
Accept-Encoding:
|
60
|
+
- gzip, deflate
|
61
|
+
X-Auth-Token:
|
62
|
+
- Nt5skc1xXsvKKSsyp3Bsx7ABNdJz9pc1uA9kyTdjnJkr
|
63
|
+
User-Agent:
|
64
|
+
- Ruby
|
65
|
+
response:
|
66
|
+
status:
|
67
|
+
code: 200
|
68
|
+
message: !binary |-
|
69
|
+
T0s=
|
70
|
+
headers:
|
71
|
+
!binary "U2VydmVy":
|
72
|
+
- !binary |-
|
73
|
+
bmdpbngvMS4xLjI=
|
74
|
+
!binary "RGF0ZQ==":
|
75
|
+
- !binary |-
|
76
|
+
RnJpLCAxOCBKYW4gMjAxMyAxNzowMDoxNiBHTVQ=
|
77
|
+
!binary "Q29udGVudC1UeXBl":
|
78
|
+
- !binary |-
|
79
|
+
YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
|
80
|
+
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
81
|
+
- !binary |-
|
82
|
+
Y2h1bmtlZA==
|
83
|
+
!binary "Q29ubmVjdGlvbg==":
|
84
|
+
- !binary |-
|
85
|
+
a2VlcC1hbGl2ZQ==
|
86
|
+
!binary "VmFyeQ==":
|
87
|
+
- !binary |-
|
88
|
+
QWNjZXB0LUVuY29kaW5n
|
89
|
+
!binary "U3RhdHVz":
|
90
|
+
- !binary |-
|
91
|
+
MjAwIE9L
|
92
|
+
!binary "WC1VYS1Db21wYXRpYmxl":
|
93
|
+
- !binary |-
|
94
|
+
SUU9RWRnZSxjaHJvbWU9MQ==
|
95
|
+
!binary "RXRhZw==":
|
96
|
+
- !binary |-
|
97
|
+
ImEzYjZhZTYyYzFjMGUzYTc0ODE4NjJhYWIyY2I1NzBhIg==
|
98
|
+
!binary "Q2FjaGUtQ29udHJvbA==":
|
99
|
+
- !binary |-
|
100
|
+
bWF4LWFnZT0wLCBwcml2YXRlLCBtdXN0LXJldmFsaWRhdGU=
|
101
|
+
!binary "WC1SZXF1ZXN0LUlk":
|
102
|
+
- !binary |-
|
103
|
+
MDQ3ZDEzZjRlMTJmN2RlMWU4ZGQ0OTIzMzU1OGI0NGI=
|
104
|
+
!binary "WC1SdW50aW1l":
|
105
|
+
- !binary |-
|
106
|
+
MC4wNDg3NDE=
|
107
|
+
!binary "WC1SYWNrLUNhY2hl":
|
108
|
+
- !binary |-
|
109
|
+
bWlzcw==
|
110
|
+
!binary "Q29udGVudC1FbmNvZGluZw==":
|
111
|
+
- !binary |-
|
112
|
+
Z3ppcA==
|
113
|
+
body:
|
114
|
+
encoding: ASCII-8BIT
|
115
|
+
string: !binary |-
|
116
|
+
H4sIAAAAAAAAA2WPzWrDMBCEX6XonBjZxtTWqQ+Ru1hLayzQT5DWNSH43btK
|
117
|
+
k/YQnZbZTzszd+GsUGKQy4jdCPMy2s9pmfpB1teKk8AAzjNiMaRYKIOB9OWT
|
118
|
+
gR3nxqTQzJkp68rVw01HCMgwZQeeZdbiS7s8NZMRCK0GYrHtz7I9t+OH7NUg
|
119
|
+
lewYyEhbjvoKtGqb2D6+LvZNxL0UjBbzv/c7r7/B11538Rwob3g8rK2jUheG
|
120
|
+
y2yBY9DqiuZqtArVcuKMfKn+kSfxkP1NqOlv1hk5A/jf+J2sBTouIN6J3dWb
|
121
|
+
8jh+AJ8YrJdlAQAA
|
122
|
+
http_version:
|
123
|
+
recorded_at: Fri, 18 Jan 2013 17:00:16 GMT
|
124
|
+
recorded_with: VCR 2.3.0
|
@@ -0,0 +1,150 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://emailmarketing.locaweb.com.br/api/v1/accounts/50f8e28abf8d79f935000001/custom_fields
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ! '{"custom_field":{"name":"Cidadee","type":"string"}}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*; q=0.5, application/xml'
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
X-Auth-Token:
|
15
|
+
- Nt5skc1xXsvKKSsyp3Bsx7ABNdJz9pc1uA9kyTdjnJkr
|
16
|
+
Content-Type:
|
17
|
+
- application/json
|
18
|
+
Content-Length:
|
19
|
+
- '51'
|
20
|
+
User-Agent:
|
21
|
+
- Ruby
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: !binary |-
|
26
|
+
T0s=
|
27
|
+
headers:
|
28
|
+
!binary "U2VydmVy":
|
29
|
+
- !binary |-
|
30
|
+
bmdpbngvMS4xLjI=
|
31
|
+
!binary "RGF0ZQ==":
|
32
|
+
- !binary |-
|
33
|
+
RnJpLCAxOCBKYW4gMjAxMyAxNzowMTo0NCBHTVQ=
|
34
|
+
!binary "Q29udGVudC1UeXBl":
|
35
|
+
- !binary |-
|
36
|
+
YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
|
37
|
+
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
38
|
+
- !binary |-
|
39
|
+
Y2h1bmtlZA==
|
40
|
+
!binary "Q29ubmVjdGlvbg==":
|
41
|
+
- !binary |-
|
42
|
+
a2VlcC1hbGl2ZQ==
|
43
|
+
!binary "VmFyeQ==":
|
44
|
+
- !binary |-
|
45
|
+
QWNjZXB0LUVuY29kaW5n
|
46
|
+
!binary "U3RhdHVz":
|
47
|
+
- !binary |-
|
48
|
+
MjAwIE9L
|
49
|
+
!binary "WC1VYS1Db21wYXRpYmxl":
|
50
|
+
- !binary |-
|
51
|
+
SUU9RWRnZSxjaHJvbWU9MQ==
|
52
|
+
!binary "RXRhZw==":
|
53
|
+
- !binary |-
|
54
|
+
ImY1NzRhNGE0MzhmNWQzZDdiYjM0ZmRiNzYwMWRiYWZkIg==
|
55
|
+
!binary "Q2FjaGUtQ29udHJvbA==":
|
56
|
+
- !binary |-
|
57
|
+
bWF4LWFnZT0wLCBwcml2YXRlLCBtdXN0LXJldmFsaWRhdGU=
|
58
|
+
!binary "WC1SZXF1ZXN0LUlk":
|
59
|
+
- !binary |-
|
60
|
+
MGU1YmVkZjBjOTJhOWYyNDhjYjNjNjA4NjM0ZjdlODU=
|
61
|
+
!binary "WC1SdW50aW1l":
|
62
|
+
- !binary |-
|
63
|
+
MC4wMTUxNzQ=
|
64
|
+
!binary "WC1SYWNrLUNhY2hl":
|
65
|
+
- !binary |-
|
66
|
+
aW52YWxpZGF0ZSwgcGFzcw==
|
67
|
+
!binary "Q29udGVudC1FbmNvZGluZw==":
|
68
|
+
- !binary |-
|
69
|
+
Z3ppcA==
|
70
|
+
body:
|
71
|
+
encoding: ASCII-8BIT
|
72
|
+
string: !binary |-
|
73
|
+
H4sIAAAAAAAAA6tWykxRslIyNUizNE9LszC2SDS1MEpJMUgxMLAwTDZWqgUA
|
74
|
+
SBs2HiEAAAA=
|
75
|
+
http_version:
|
76
|
+
recorded_at: Fri, 18 Jan 2013 17:01:44 GMT
|
77
|
+
- request:
|
78
|
+
method: get
|
79
|
+
uri: https://emailmarketing.locaweb.com.br/api/v1/accounts/50f8e28abf8d79f935000001/custom_fields
|
80
|
+
body:
|
81
|
+
encoding: US-ASCII
|
82
|
+
string: ''
|
83
|
+
headers:
|
84
|
+
Accept:
|
85
|
+
- application/json
|
86
|
+
Accept-Encoding:
|
87
|
+
- gzip, deflate
|
88
|
+
X-Auth-Token:
|
89
|
+
- Nt5skc1xXsvKKSsyp3Bsx7ABNdJz9pc1uA9kyTdjnJkr
|
90
|
+
User-Agent:
|
91
|
+
- Ruby
|
92
|
+
response:
|
93
|
+
status:
|
94
|
+
code: 200
|
95
|
+
message: !binary |-
|
96
|
+
T0s=
|
97
|
+
headers:
|
98
|
+
!binary "U2VydmVy":
|
99
|
+
- !binary |-
|
100
|
+
bmdpbngvMS4xLjI=
|
101
|
+
!binary "RGF0ZQ==":
|
102
|
+
- !binary |-
|
103
|
+
RnJpLCAxOCBKYW4gMjAxMyAxNzowMTo0NCBHTVQ=
|
104
|
+
!binary "Q29udGVudC1UeXBl":
|
105
|
+
- !binary |-
|
106
|
+
YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
|
107
|
+
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
108
|
+
- !binary |-
|
109
|
+
Y2h1bmtlZA==
|
110
|
+
!binary "Q29ubmVjdGlvbg==":
|
111
|
+
- !binary |-
|
112
|
+
a2VlcC1hbGl2ZQ==
|
113
|
+
!binary "VmFyeQ==":
|
114
|
+
- !binary |-
|
115
|
+
QWNjZXB0LUVuY29kaW5n
|
116
|
+
!binary "U3RhdHVz":
|
117
|
+
- !binary |-
|
118
|
+
MjAwIE9L
|
119
|
+
!binary "WC1VYS1Db21wYXRpYmxl":
|
120
|
+
- !binary |-
|
121
|
+
SUU9RWRnZSxjaHJvbWU9MQ==
|
122
|
+
!binary "RXRhZw==":
|
123
|
+
- !binary |-
|
124
|
+
ImVjNjNkMTA3ZDRkODU3OTIwNDQwMzhjMzU5NDI0YmM3Ig==
|
125
|
+
!binary "Q2FjaGUtQ29udHJvbA==":
|
126
|
+
- !binary |-
|
127
|
+
bWF4LWFnZT0wLCBwcml2YXRlLCBtdXN0LXJldmFsaWRhdGU=
|
128
|
+
!binary "WC1SZXF1ZXN0LUlk":
|
129
|
+
- !binary |-
|
130
|
+
ODc0NTJkZjc1OTA1NTc2YjZkOTVlNzU2MmYwMThiZDg=
|
131
|
+
!binary "WC1SdW50aW1l":
|
132
|
+
- !binary |-
|
133
|
+
MC4wMTAzMzY=
|
134
|
+
!binary "WC1SYWNrLUNhY2hl":
|
135
|
+
- !binary |-
|
136
|
+
bWlzcw==
|
137
|
+
!binary "Q29udGVudC1FbmNvZGluZw==":
|
138
|
+
- !binary |-
|
139
|
+
Z3ppcA==
|
140
|
+
body:
|
141
|
+
encoding: ASCII-8BIT
|
142
|
+
string: !binary |-
|
143
|
+
H4sIAAAAAAAAA4XQzQqDMAwH8FeRnD3Uj2L1up33AmOHaFIprFW0HkR891V2
|
144
|
+
UEG2nMKf9EeaBYxnO0L1XMAQVCCFLgutVaZQqpRIkBAqaTKIwaHlMHEzhMQc
|
145
|
+
Aj/3WzD6wbgW1vhEcP4lWG5EwQp3ounItN0uuMnWPJwExanCWisqSl1mUmwl
|
146
|
+
d+GOHiPiyOHYGMvOHzRCz3+t/LCN8fPP31y9Pxzk0dmLa7xi6LENyQLNNAxh
|
147
|
+
RaiSMNV5fIduXT8HSsLtewEAAA==
|
148
|
+
http_version:
|
149
|
+
recorded_at: Fri, 18 Jan 2013 17:01:44 GMT
|
150
|
+
recorded_with: VCR 2.3.0
|