aweber 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +27 -0
- data/aweber.gemspec +3 -32
- data/lib/aweber/resources/campaign.rb +42 -0
- data/lib/aweber/resources/custom_field.rb +12 -0
- metadata +11 -10
- data/Gemfile.lock +0 -33
- data/spec/support/spec_routing.rb +0 -46
data/.document
ADDED
data/.gitignore
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
## MAC OS
|
2
|
+
.DS_Store
|
3
|
+
|
4
|
+
## TEXTMATE
|
5
|
+
*.tmproj
|
6
|
+
tmtags
|
7
|
+
|
8
|
+
## EMACS
|
9
|
+
*~
|
10
|
+
\#*
|
11
|
+
.\#*
|
12
|
+
|
13
|
+
## VIM
|
14
|
+
*.swp
|
15
|
+
|
16
|
+
## PROJECT::GENERAL
|
17
|
+
coverage
|
18
|
+
rdoc
|
19
|
+
docs
|
20
|
+
pkg
|
21
|
+
Gemfile.lock
|
22
|
+
|
23
|
+
## PROJECT::SPECIFIC
|
24
|
+
.yardoc
|
25
|
+
.bundle
|
26
|
+
examples/staging.rb
|
27
|
+
examples/production.rb
|
data/aweber.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = "aweber"
|
4
|
-
s.version = "1.3.
|
4
|
+
s.version = "1.3.1"
|
5
5
|
s.platform = Gem::Platform::RUBY
|
6
6
|
s.summary = "Ruby interface to AWeber's API"
|
7
7
|
s.description = "Ruby interface to AWeber's API"
|
@@ -11,38 +11,9 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.homepage = "http://github.com/aweber/AWeber-API-Ruby-Library"
|
12
12
|
|
13
13
|
s.require_path = "lib"
|
14
|
-
s.files =
|
15
|
-
|
16
|
-
"examples/with_access_token.rb",
|
17
|
-
"examples/your_account.rb",
|
18
|
-
"Gemfile",
|
19
|
-
"Gemfile.lock",
|
20
|
-
"lib/aweber.rb",
|
21
|
-
"lib/aweber/base.rb",
|
22
|
-
"lib/aweber/collection.rb",
|
23
|
-
"lib/aweber/oauth.rb",
|
24
|
-
"lib/aweber/resource.rb",
|
25
|
-
"lib/aweber/resources.rb",
|
26
|
-
"lib/aweber/resources/account.rb",
|
27
|
-
"lib/aweber/resources/broadcast.rb",
|
28
|
-
"lib/aweber/resources/click.rb",
|
29
|
-
"lib/aweber/resources/followup.rb",
|
30
|
-
"lib/aweber/resources/integration.rb",
|
31
|
-
"lib/aweber/resources/link.rb",
|
32
|
-
"lib/aweber/resources/list.rb",
|
33
|
-
"lib/aweber/resources/message.rb",
|
34
|
-
"lib/aweber/resources/open.rb",
|
35
|
-
"lib/aweber/resources/subscriber.rb",
|
36
|
-
"lib/aweber/resources/tracked_event.rb",
|
37
|
-
"lib/aweber/resources/web_form.rb",
|
38
|
-
"lib/aweber/resources/web_form_split_test.rb",
|
39
|
-
"lib/aweber/resources/web_form_split_test_component.rb",
|
40
|
-
"LICENSE",
|
41
|
-
"Rakefile",
|
42
|
-
"README.textile",
|
43
|
-
]
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.test_files = `git ls-files -- spec/*`.split("\n")
|
44
16
|
|
45
|
-
s.test_files = Dir["spec/**/*"]
|
46
17
|
s.extra_rdoc_files = ["LICENSE", "README.textile"]
|
47
18
|
|
48
19
|
s.add_dependency "oauth"
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module AWeber
|
2
|
+
module Resources
|
3
|
+
class Campaign < Resource
|
4
|
+
basepath "/campaigns"
|
5
|
+
|
6
|
+
api_attr :click_tracking_enabled
|
7
|
+
api_attr :content_type
|
8
|
+
api_attr :is_archived
|
9
|
+
api_attr :message_interval
|
10
|
+
api_attr :message_number
|
11
|
+
api_attr :scheduled_at
|
12
|
+
api_attr :sent_at
|
13
|
+
api_attr :spam_assassin_score
|
14
|
+
api_attr :subject
|
15
|
+
api_attr :total_clicked
|
16
|
+
api_attr :total_clicks
|
17
|
+
api_attr :total_opened
|
18
|
+
api_attr :total_opens
|
19
|
+
api_attr :total_sent
|
20
|
+
api_attr :total_spam_complaints
|
21
|
+
api_attr :total_undelivered
|
22
|
+
api_attr :total_unsubscribes
|
23
|
+
api_attr :twitter_account_link
|
24
|
+
api_attr :links_collection_link
|
25
|
+
api_attr :messages_collection_link
|
26
|
+
|
27
|
+
has_many :links
|
28
|
+
has_many :messages
|
29
|
+
|
30
|
+
alias_attribute :is_archived?, :is_archived
|
31
|
+
alias_attribute :is_click_tracking_enabled?, :click_tracking_enabled
|
32
|
+
|
33
|
+
def is_followup?
|
34
|
+
resource_type_link.split("#").last =~ /^followup/
|
35
|
+
end
|
36
|
+
|
37
|
+
def is_broadcast?
|
38
|
+
resource_type_link.split("#").last =~ /^broadcast/
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module AWeber
|
2
|
+
module Resources
|
3
|
+
class CustomField < Resource
|
4
|
+
basepath "/custom_fields"
|
5
|
+
|
6
|
+
api_attr :name, :writable => true
|
7
|
+
api_attr :is_subscriber_updateable, :writable => true
|
8
|
+
|
9
|
+
alias_attribute :is_subscriber_updateable?, :is_subscriber_updateable
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 1.3.
|
8
|
+
- 1
|
9
|
+
version: 1.3.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- AWeber Communications, Inc.
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-04-
|
17
|
+
date: 2011-04-16 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -96,11 +96,15 @@ extra_rdoc_files:
|
|
96
96
|
- LICENSE
|
97
97
|
- README.textile
|
98
98
|
files:
|
99
|
+
- .document
|
100
|
+
- .gitignore
|
101
|
+
- Gemfile
|
102
|
+
- LICENSE
|
103
|
+
- README.textile
|
104
|
+
- Rakefile
|
99
105
|
- aweber.gemspec
|
100
106
|
- examples/with_access_token.rb
|
101
107
|
- examples/your_account.rb
|
102
|
-
- Gemfile
|
103
|
-
- Gemfile.lock
|
104
108
|
- lib/aweber.rb
|
105
109
|
- lib/aweber/base.rb
|
106
110
|
- lib/aweber/collection.rb
|
@@ -109,7 +113,9 @@ files:
|
|
109
113
|
- lib/aweber/resources.rb
|
110
114
|
- lib/aweber/resources/account.rb
|
111
115
|
- lib/aweber/resources/broadcast.rb
|
116
|
+
- lib/aweber/resources/campaign.rb
|
112
117
|
- lib/aweber/resources/click.rb
|
118
|
+
- lib/aweber/resources/custom_field.rb
|
113
119
|
- lib/aweber/resources/followup.rb
|
114
120
|
- lib/aweber/resources/integration.rb
|
115
121
|
- lib/aweber/resources/link.rb
|
@@ -121,9 +127,6 @@ files:
|
|
121
127
|
- lib/aweber/resources/web_form.rb
|
122
128
|
- lib/aweber/resources/web_form_split_test.rb
|
123
129
|
- lib/aweber/resources/web_form_split_test_component.rb
|
124
|
-
- LICENSE
|
125
|
-
- Rakefile
|
126
|
-
- README.textile
|
127
130
|
- spec/base_spec.rb
|
128
131
|
- spec/collection_spec.rb
|
129
132
|
- spec/fixtures/account.json
|
@@ -172,7 +175,6 @@ files:
|
|
172
175
|
- spec/resources/web_form_split_test_spec.rb
|
173
176
|
- spec/spec_helper.rb
|
174
177
|
- spec/support/fake_classes.rb
|
175
|
-
- spec/support/spec_routing.rb
|
176
178
|
has_rdoc: true
|
177
179
|
homepage: http://github.com/aweber/AWeber-API-Ruby-Library
|
178
180
|
licenses: []
|
@@ -254,4 +256,3 @@ test_files:
|
|
254
256
|
- spec/resources/web_form_split_test_spec.rb
|
255
257
|
- spec/spec_helper.rb
|
256
258
|
- spec/support/fake_classes.rb
|
257
|
-
- spec/support/spec_routing.rb
|
data/Gemfile.lock
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
aweber (1.2.0)
|
5
|
-
json_pure
|
6
|
-
oauth
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: http://rubygems.org/
|
10
|
-
specs:
|
11
|
-
diff-lcs (1.1.2)
|
12
|
-
fakeweb (1.3.0)
|
13
|
-
json_pure (1.4.6)
|
14
|
-
oauth (0.4.4)
|
15
|
-
rspec (2.1.0)
|
16
|
-
rspec-core (~> 2.1.0)
|
17
|
-
rspec-expectations (~> 2.1.0)
|
18
|
-
rspec-mocks (~> 2.1.0)
|
19
|
-
rspec-core (2.1.0)
|
20
|
-
rspec-expectations (2.1.0)
|
21
|
-
diff-lcs (~> 1.1.2)
|
22
|
-
rspec-mocks (2.1.0)
|
23
|
-
yard (0.6.4)
|
24
|
-
|
25
|
-
PLATFORMS
|
26
|
-
java
|
27
|
-
ruby
|
28
|
-
|
29
|
-
DEPENDENCIES
|
30
|
-
aweber!
|
31
|
-
fakeweb
|
32
|
-
rspec (~> 2.1.0)
|
33
|
-
yard (~> 0.6.0)
|
@@ -1,46 +0,0 @@
|
|
1
|
-
module SpecRouting
|
2
|
-
def self.included(base)
|
3
|
-
SpecRouting.setup_fixtures
|
4
|
-
end
|
5
|
-
|
6
|
-
class << self
|
7
|
-
def get(uri, &block)
|
8
|
-
FakeWeb.register_uri(:get, uri, :body => block.call)
|
9
|
-
end
|
10
|
-
|
11
|
-
def any(uri, &block)
|
12
|
-
FakeWeb.register_uri(:any, uri, :body => block.call)
|
13
|
-
end
|
14
|
-
|
15
|
-
def resource(name)
|
16
|
-
fixture(name, "resources")
|
17
|
-
end
|
18
|
-
|
19
|
-
def fixture(name, subdir="")
|
20
|
-
fixtures = Pathname.new(File.dirname(__FILE__) + "/fixtures/#{subdir}")
|
21
|
-
fixtures += "#{name}.json"
|
22
|
-
fixtures.read.gsub(/[\s\n]/, '')
|
23
|
-
end
|
24
|
-
|
25
|
-
def setup_fixtures
|
26
|
-
any("https://auth.aweber.com/1.0/request_token") { "oauth_token=fake&oauth_token_secret=fake" }
|
27
|
-
any("https://auth.aweber.com/1.0/access_token") { "oauth_token=fake&oauth_token_secret=fake" }
|
28
|
-
|
29
|
-
get(%r[/cars]) { fixture(:cars) }
|
30
|
-
|
31
|
-
get(%r[/accounts\?]) { resource(:accounts) }
|
32
|
-
get(%r[/accounts/\d+/integrations\?]) { resource(:integrations) }
|
33
|
-
get(%r[/accounts/\d+/lists\?]) { resource(:lists) }
|
34
|
-
get(%r[/accounts/\d+/lists/\d+/subscribers\?]) { resource(:subscribers) }
|
35
|
-
get(%r[/accounts/\d+/lists/\d+/web_forms\?]) { resource(:web_forms) }
|
36
|
-
get(%r[/accounts/\d+/lists/\d+/web_form_split_tests\?]) { resource(:web_form_split_tests) }
|
37
|
-
get(%r[/accounts/\d+/lists/\d+/web_form_split_tests/\d+/components\?]) { resource(:web_form_split_test_components) }
|
38
|
-
get(%r[/accounts/\d+/lists/\d+/campaigns\?]) { resource(:campaigns) }
|
39
|
-
get(%r[/accounts/\d+/lists/\d+/campaigns/[\d\w]+/links\?]) { resource(:links) }
|
40
|
-
get(%r[/accounts/\d+/lists/\d+/campaigns/[\d\w]+/links/\d+/clicks\?]) { resource(:clicks) }
|
41
|
-
get(%r[/accounts/\d+/lists/\d+/campaigns/[\d\w]+/messages\?]) { resource(:messages) }
|
42
|
-
get(%r[/accounts/\d+/lists/\d+/campaigns/[\d\w]+/messages/\d+/opens\?]) { resource(:opens) }
|
43
|
-
get(%r[/accounts/\d+/lists/\d+/campaigns/[\d\w]+/messages/\d+/tracked_events\?]) { resource(:tracked_events) }
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|