streamsend 0.2.3 → 1.0.0.rc1
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/.gitignore +18 -5
- data/.rspec +1 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +25 -17
- data/README.md +76 -0
- data/Rakefile +1 -2
- data/lib/streamsend/api/account.rb +6 -48
- data/lib/streamsend/api/audience.rb +14 -0
- data/lib/streamsend/api/base/base_call.rb +60 -0
- data/lib/streamsend/api/base/create.rb +41 -0
- data/lib/streamsend/api/base/destroy.rb +43 -0
- data/lib/streamsend/api/base/index.rb +51 -0
- data/lib/streamsend/api/base/show.rb +42 -0
- data/lib/streamsend/api/base/update.rb +43 -0
- data/lib/streamsend/api/blast.rb +51 -0
- data/lib/streamsend/api/bounce.rb +20 -0
- data/lib/streamsend/api/click.rb +18 -0
- data/lib/streamsend/api/configuration.rb +26 -0
- data/lib/streamsend/api/email.rb +20 -0
- data/lib/streamsend/api/exception.rb +4 -4
- data/lib/streamsend/api/field.rb +20 -0
- data/lib/streamsend/api/field_option.rb +60 -0
- data/lib/streamsend/api/filter.rb +20 -0
- data/lib/streamsend/api/from_email_address.rb +24 -0
- data/lib/streamsend/api/import.rb +11 -0
- data/lib/streamsend/api/link.rb +11 -0
- data/lib/streamsend/api/list.rb +13 -39
- data/lib/streamsend/api/membership.rb +28 -0
- data/lib/streamsend/api/person.rb +66 -0
- data/lib/streamsend/api/result.rb +13 -0
- data/lib/streamsend/api/session.rb +73 -0
- data/lib/streamsend/api/unsubscribe.rb +20 -0
- data/lib/streamsend/api/upload.rb +13 -0
- data/lib/streamsend/api/user.rb +67 -38
- data/lib/streamsend/api/view.rb +8 -0
- data/lib/streamsend/version.rb +3 -0
- data/lib/streamsend.rb +35 -16
- data/spec/lib/streamsend/api/integration/account_spec.rb +50 -0
- data/spec/lib/streamsend/api/integration/audience_spec.rb +56 -0
- data/spec/lib/streamsend/api/integration/blast_spec.rb +110 -0
- data/spec/lib/streamsend/api/integration/bounce_spec.rb +43 -0
- data/spec/lib/streamsend/api/integration/click_spec.rb +37 -0
- data/spec/lib/streamsend/api/integration/email_spec.rb +76 -0
- data/spec/lib/streamsend/api/integration/field_option_spec.rb +87 -0
- data/spec/lib/streamsend/api/integration/field_spec.rb +75 -0
- data/spec/lib/streamsend/api/integration/filter_spec.rb +101 -0
- data/spec/lib/streamsend/api/integration/from_email_address_spec.rb +46 -0
- data/spec/lib/streamsend/api/integration/helpers.rb +16 -0
- data/spec/lib/streamsend/api/integration/import_spec.rb +35 -0
- data/spec/lib/streamsend/api/integration/link_spec.rb +39 -0
- data/spec/lib/streamsend/api/integration/list_spec.rb +83 -0
- data/spec/lib/streamsend/api/integration/membership_spec.rb +69 -0
- data/spec/lib/streamsend/api/integration/person_spec.rb +119 -0
- data/spec/lib/streamsend/api/integration/unsubscribe_spec.rb +47 -0
- data/spec/lib/streamsend/api/integration/upload_spec.rb +29 -0
- data/spec/lib/streamsend/api/integration/user_spec.rb +99 -0
- data/spec/lib/streamsend/api/integration/view_spec.rb +27 -0
- data/spec/lib/streamsend/api/unit/base/base_call_spec.rb +66 -0
- data/spec/lib/streamsend/api/unit/base/create_spec.rb +67 -0
- data/spec/lib/streamsend/api/unit/base/destroy_spec.rb +59 -0
- data/spec/lib/streamsend/api/unit/base/index_spec.rb +85 -0
- data/spec/lib/streamsend/api/unit/base/show_spec.rb +68 -0
- data/spec/lib/streamsend/api/unit/base/update_spec.rb +76 -0
- data/spec/lib/streamsend/api/unit/blast_spec.rb +79 -0
- data/spec/lib/streamsend/api/unit/bounce_spec.rb +36 -0
- data/spec/lib/streamsend/api/unit/click_spec.rb +34 -0
- data/spec/lib/streamsend/api/unit/field_option_spec.rb +71 -0
- data/spec/lib/streamsend/api/unit/from_email_address_spec.rb +20 -0
- data/spec/lib/streamsend/api/unit/link_spec.rb +33 -0
- data/spec/lib/streamsend/api/unit/list_spec.rb +33 -0
- data/spec/lib/streamsend/api/unit/membership_spec.rb +46 -0
- data/spec/lib/streamsend/api/unit/person_spec.rb +102 -0
- data/spec/lib/streamsend/api/unit/result_spec.rb +13 -0
- data/spec/lib/streamsend/api/unit/session_spec.rb +62 -0
- data/spec/lib/streamsend/api/unit/unsubscribe_spec.rb +33 -0
- data/spec/lib/streamsend/api/unit/user_spec.rb +102 -0
- data/spec/spec_helper.rb +8 -11
- data/streamsend.gemspec +22 -23
- metadata +250 -178
- checksums.yaml +0 -7
- data/.pair +0 -10
- data/README.rdoc +0 -1
- data/lib/streamsend/api/resource.rb +0 -41
- data/lib/streamsend/api/subscriber.rb +0 -113
- data/spec/integration/account_spec.rb +0 -69
- data/spec/integration/fixtures/vcr_cassettes/streamsend.yml +0 -6831
- data/spec/integration/integration.yml +0 -5
- data/spec/integration/list_spec.rb +0 -68
- data/spec/integration/spec_helper.rb +0 -16
- data/spec/integration/subscriber_spec.rb +0 -24
- data/spec/integration/user_spec.rb +0 -58
- data/spec/lib/streamsend/api/list_spec.rb +0 -179
- data/spec/lib/streamsend/api/resource_spec.rb +0 -24
- data/spec/lib/streamsend/api/subscriber_spec.rb +0 -345
- data/spec/lib/streamsend/api/user_spec.rb +0 -149
- data/spec/lib/streamsend/api_spec.rb +0 -31
- data/watcher_config.rb +0 -2
metadata
CHANGED
|
@@ -1,227 +1,299 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: streamsend
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
hash: 2732165157
|
|
5
|
+
prerelease: 6
|
|
6
|
+
segments:
|
|
7
|
+
- 1
|
|
8
|
+
- 0
|
|
9
|
+
- 0
|
|
10
|
+
- rc
|
|
11
|
+
- 1
|
|
12
|
+
version: 1.0.0.rc1
|
|
5
13
|
platform: ruby
|
|
6
|
-
authors:
|
|
7
|
-
- Scott Albertson
|
|
8
|
-
- Jeff Roush
|
|
9
|
-
- Mark Eschbach
|
|
14
|
+
authors:
|
|
10
15
|
- Bob Yeo
|
|
11
16
|
autorequire:
|
|
12
17
|
bindir: bin
|
|
13
18
|
cert_chain: []
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
requirements:
|
|
20
|
-
- - '>='
|
|
21
|
-
- !ruby/object:Gem::Version
|
|
22
|
-
version: '0'
|
|
23
|
-
type: :runtime
|
|
19
|
+
|
|
20
|
+
date: 2013-10-11 00:00:00 Z
|
|
21
|
+
dependencies:
|
|
22
|
+
- !ruby/object:Gem::Dependency
|
|
23
|
+
name: httmultiparty
|
|
24
24
|
prerelease: false
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- - ~>
|
|
35
|
-
- !ruby/object:Gem::Version
|
|
36
|
-
version: '3.2'
|
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
|
26
|
+
none: false
|
|
27
|
+
requirements:
|
|
28
|
+
- - ">="
|
|
29
|
+
- !ruby/object:Gem::Version
|
|
30
|
+
hash: 3
|
|
31
|
+
segments:
|
|
32
|
+
- 0
|
|
33
|
+
version: "0"
|
|
37
34
|
type: :runtime
|
|
35
|
+
version_requirements: *id001
|
|
36
|
+
- !ruby/object:Gem::Dependency
|
|
37
|
+
name: activesupport
|
|
38
38
|
prerelease: false
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
|
40
|
+
none: false
|
|
41
|
+
requirements:
|
|
41
42
|
- - ~>
|
|
42
|
-
- !ruby/object:Gem::Version
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
- - '>='
|
|
49
|
-
- !ruby/object:Gem::Version
|
|
50
|
-
version: '0'
|
|
43
|
+
- !ruby/object:Gem::Version
|
|
44
|
+
hash: 3
|
|
45
|
+
segments:
|
|
46
|
+
- 3
|
|
47
|
+
- 2
|
|
48
|
+
version: "3.2"
|
|
51
49
|
type: :runtime
|
|
50
|
+
version_requirements: *id002
|
|
51
|
+
- !ruby/object:Gem::Dependency
|
|
52
|
+
name: builder
|
|
52
53
|
prerelease: false
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
|
55
|
+
none: false
|
|
56
|
+
requirements:
|
|
57
|
+
- - ">="
|
|
58
|
+
- !ruby/object:Gem::Version
|
|
59
|
+
hash: 3
|
|
60
|
+
segments:
|
|
61
|
+
- 0
|
|
62
|
+
version: "0"
|
|
63
|
+
type: :runtime
|
|
64
|
+
version_requirements: *id003
|
|
65
|
+
- !ruby/object:Gem::Dependency
|
|
59
66
|
name: rspec
|
|
60
|
-
requirement: !ruby/object:Gem::Requirement
|
|
61
|
-
requirements:
|
|
62
|
-
- - '>='
|
|
63
|
-
- !ruby/object:Gem::Version
|
|
64
|
-
version: '0'
|
|
65
|
-
type: :development
|
|
66
67
|
prerelease: false
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
- - '>='
|
|
77
|
-
- !ruby/object:Gem::Version
|
|
78
|
-
version: '0'
|
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
|
69
|
+
none: false
|
|
70
|
+
requirements:
|
|
71
|
+
- - ">="
|
|
72
|
+
- !ruby/object:Gem::Version
|
|
73
|
+
hash: 3
|
|
74
|
+
segments:
|
|
75
|
+
- 0
|
|
76
|
+
version: "0"
|
|
79
77
|
type: :development
|
|
78
|
+
version_requirements: *id004
|
|
79
|
+
- !ruby/object:Gem::Dependency
|
|
80
|
+
name: git-commit-story
|
|
80
81
|
prerelease: false
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
- - ~>
|
|
91
|
-
- !ruby/object:Gem::Version
|
|
92
|
-
version: '1.6'
|
|
82
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
|
83
|
+
none: false
|
|
84
|
+
requirements:
|
|
85
|
+
- - ">="
|
|
86
|
+
- !ruby/object:Gem::Version
|
|
87
|
+
hash: 3
|
|
88
|
+
segments:
|
|
89
|
+
- 0
|
|
90
|
+
version: "0"
|
|
93
91
|
type: :development
|
|
92
|
+
version_requirements: *id005
|
|
93
|
+
- !ruby/object:Gem::Dependency
|
|
94
|
+
name: webmock
|
|
94
95
|
prerelease: false
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
|
97
|
+
none: false
|
|
98
|
+
requirements:
|
|
97
99
|
- - ~>
|
|
98
|
-
- !ruby/object:Gem::Version
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
- - '>='
|
|
105
|
-
- !ruby/object:Gem::Version
|
|
106
|
-
version: '0'
|
|
107
|
-
type: :development
|
|
108
|
-
prerelease: false
|
|
109
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
110
|
-
requirements:
|
|
111
|
-
- - '>='
|
|
112
|
-
- !ruby/object:Gem::Version
|
|
113
|
-
version: '0'
|
|
114
|
-
- !ruby/object:Gem::Dependency
|
|
115
|
-
name: watchr
|
|
116
|
-
requirement: !ruby/object:Gem::Requirement
|
|
117
|
-
requirements:
|
|
118
|
-
- - '>='
|
|
119
|
-
- !ruby/object:Gem::Version
|
|
120
|
-
version: '0'
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
hash: 3
|
|
102
|
+
segments:
|
|
103
|
+
- 1
|
|
104
|
+
- 6
|
|
105
|
+
version: "1.6"
|
|
121
106
|
type: :development
|
|
107
|
+
version_requirements: *id006
|
|
108
|
+
- !ruby/object:Gem::Dependency
|
|
109
|
+
name: pair-salad
|
|
122
110
|
prerelease: false
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
- - '>='
|
|
133
|
-
- !ruby/object:Gem::Version
|
|
134
|
-
version: '0'
|
|
111
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
|
112
|
+
none: false
|
|
113
|
+
requirements:
|
|
114
|
+
- - ">="
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
hash: 3
|
|
117
|
+
segments:
|
|
118
|
+
- 0
|
|
119
|
+
version: "0"
|
|
135
120
|
type: :development
|
|
121
|
+
version_requirements: *id007
|
|
122
|
+
- !ruby/object:Gem::Dependency
|
|
123
|
+
name: ruby-debug
|
|
136
124
|
prerelease: false
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
- - '>='
|
|
147
|
-
- !ruby/object:Gem::Version
|
|
148
|
-
version: '0'
|
|
125
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
|
126
|
+
none: false
|
|
127
|
+
requirements:
|
|
128
|
+
- - ">="
|
|
129
|
+
- !ruby/object:Gem::Version
|
|
130
|
+
hash: 3
|
|
131
|
+
segments:
|
|
132
|
+
- 0
|
|
133
|
+
version: "0"
|
|
149
134
|
type: :development
|
|
150
|
-
|
|
151
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
152
|
-
requirements:
|
|
153
|
-
- - '>='
|
|
154
|
-
- !ruby/object:Gem::Version
|
|
155
|
-
version: '0'
|
|
135
|
+
version_requirements: *id008
|
|
156
136
|
description: Ruby wrapper for the StreamSend API.
|
|
157
|
-
email:
|
|
137
|
+
email:
|
|
138
|
+
- ryeo@ezpublishing.com
|
|
158
139
|
executables: []
|
|
140
|
+
|
|
159
141
|
extensions: []
|
|
142
|
+
|
|
160
143
|
extra_rdoc_files: []
|
|
161
|
-
|
|
144
|
+
|
|
145
|
+
files:
|
|
162
146
|
- .gitignore
|
|
163
|
-
- .pair
|
|
164
147
|
- .rspec
|
|
165
148
|
- Gemfile
|
|
166
149
|
- Gemfile.lock
|
|
167
|
-
- README.
|
|
150
|
+
- README.md
|
|
168
151
|
- Rakefile
|
|
169
152
|
- lib/streamsend.rb
|
|
170
153
|
- lib/streamsend/api/account.rb
|
|
154
|
+
- lib/streamsend/api/audience.rb
|
|
155
|
+
- lib/streamsend/api/base/base_call.rb
|
|
156
|
+
- lib/streamsend/api/base/create.rb
|
|
157
|
+
- lib/streamsend/api/base/destroy.rb
|
|
158
|
+
- lib/streamsend/api/base/index.rb
|
|
159
|
+
- lib/streamsend/api/base/show.rb
|
|
160
|
+
- lib/streamsend/api/base/update.rb
|
|
161
|
+
- lib/streamsend/api/blast.rb
|
|
162
|
+
- lib/streamsend/api/bounce.rb
|
|
163
|
+
- lib/streamsend/api/click.rb
|
|
164
|
+
- lib/streamsend/api/configuration.rb
|
|
165
|
+
- lib/streamsend/api/email.rb
|
|
171
166
|
- lib/streamsend/api/exception.rb
|
|
167
|
+
- lib/streamsend/api/field.rb
|
|
168
|
+
- lib/streamsend/api/field_option.rb
|
|
169
|
+
- lib/streamsend/api/filter.rb
|
|
170
|
+
- lib/streamsend/api/from_email_address.rb
|
|
171
|
+
- lib/streamsend/api/import.rb
|
|
172
|
+
- lib/streamsend/api/link.rb
|
|
172
173
|
- lib/streamsend/api/list.rb
|
|
173
|
-
- lib/streamsend/api/
|
|
174
|
-
- lib/streamsend/api/
|
|
174
|
+
- lib/streamsend/api/membership.rb
|
|
175
|
+
- lib/streamsend/api/person.rb
|
|
176
|
+
- lib/streamsend/api/result.rb
|
|
177
|
+
- lib/streamsend/api/session.rb
|
|
178
|
+
- lib/streamsend/api/unsubscribe.rb
|
|
179
|
+
- lib/streamsend/api/upload.rb
|
|
175
180
|
- lib/streamsend/api/user.rb
|
|
176
|
-
-
|
|
177
|
-
-
|
|
178
|
-
- spec/integration/
|
|
179
|
-
- spec/integration/
|
|
180
|
-
- spec/integration/
|
|
181
|
-
- spec/integration/
|
|
182
|
-
- spec/integration/
|
|
183
|
-
- spec/lib/streamsend/api/
|
|
184
|
-
- spec/lib/streamsend/api/
|
|
185
|
-
- spec/lib/streamsend/api/
|
|
186
|
-
- spec/lib/streamsend/api/
|
|
187
|
-
- spec/lib/streamsend/
|
|
181
|
+
- lib/streamsend/api/view.rb
|
|
182
|
+
- lib/streamsend/version.rb
|
|
183
|
+
- spec/lib/streamsend/api/integration/account_spec.rb
|
|
184
|
+
- spec/lib/streamsend/api/integration/audience_spec.rb
|
|
185
|
+
- spec/lib/streamsend/api/integration/blast_spec.rb
|
|
186
|
+
- spec/lib/streamsend/api/integration/bounce_spec.rb
|
|
187
|
+
- spec/lib/streamsend/api/integration/click_spec.rb
|
|
188
|
+
- spec/lib/streamsend/api/integration/email_spec.rb
|
|
189
|
+
- spec/lib/streamsend/api/integration/field_option_spec.rb
|
|
190
|
+
- spec/lib/streamsend/api/integration/field_spec.rb
|
|
191
|
+
- spec/lib/streamsend/api/integration/filter_spec.rb
|
|
192
|
+
- spec/lib/streamsend/api/integration/from_email_address_spec.rb
|
|
193
|
+
- spec/lib/streamsend/api/integration/helpers.rb
|
|
194
|
+
- spec/lib/streamsend/api/integration/import_spec.rb
|
|
195
|
+
- spec/lib/streamsend/api/integration/link_spec.rb
|
|
196
|
+
- spec/lib/streamsend/api/integration/list_spec.rb
|
|
197
|
+
- spec/lib/streamsend/api/integration/membership_spec.rb
|
|
198
|
+
- spec/lib/streamsend/api/integration/person_spec.rb
|
|
199
|
+
- spec/lib/streamsend/api/integration/unsubscribe_spec.rb
|
|
200
|
+
- spec/lib/streamsend/api/integration/upload_spec.rb
|
|
201
|
+
- spec/lib/streamsend/api/integration/user_spec.rb
|
|
202
|
+
- spec/lib/streamsend/api/integration/view_spec.rb
|
|
203
|
+
- spec/lib/streamsend/api/unit/base/base_call_spec.rb
|
|
204
|
+
- spec/lib/streamsend/api/unit/base/create_spec.rb
|
|
205
|
+
- spec/lib/streamsend/api/unit/base/destroy_spec.rb
|
|
206
|
+
- spec/lib/streamsend/api/unit/base/index_spec.rb
|
|
207
|
+
- spec/lib/streamsend/api/unit/base/show_spec.rb
|
|
208
|
+
- spec/lib/streamsend/api/unit/base/update_spec.rb
|
|
209
|
+
- spec/lib/streamsend/api/unit/blast_spec.rb
|
|
210
|
+
- spec/lib/streamsend/api/unit/bounce_spec.rb
|
|
211
|
+
- spec/lib/streamsend/api/unit/click_spec.rb
|
|
212
|
+
- spec/lib/streamsend/api/unit/field_option_spec.rb
|
|
213
|
+
- spec/lib/streamsend/api/unit/from_email_address_spec.rb
|
|
214
|
+
- spec/lib/streamsend/api/unit/link_spec.rb
|
|
215
|
+
- spec/lib/streamsend/api/unit/list_spec.rb
|
|
216
|
+
- spec/lib/streamsend/api/unit/membership_spec.rb
|
|
217
|
+
- spec/lib/streamsend/api/unit/person_spec.rb
|
|
218
|
+
- spec/lib/streamsend/api/unit/result_spec.rb
|
|
219
|
+
- spec/lib/streamsend/api/unit/session_spec.rb
|
|
220
|
+
- spec/lib/streamsend/api/unit/unsubscribe_spec.rb
|
|
221
|
+
- spec/lib/streamsend/api/unit/user_spec.rb
|
|
188
222
|
- spec/spec_helper.rb
|
|
189
223
|
- streamsend.gemspec
|
|
190
|
-
|
|
191
|
-
homepage: https://github.com/Jeff-R/streamsend-ruby
|
|
224
|
+
homepage: ""
|
|
192
225
|
licenses: []
|
|
193
|
-
|
|
226
|
+
|
|
194
227
|
post_install_message:
|
|
195
228
|
rdoc_options: []
|
|
196
|
-
|
|
229
|
+
|
|
230
|
+
require_paths:
|
|
197
231
|
- lib
|
|
198
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
232
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
233
|
+
none: false
|
|
234
|
+
requirements:
|
|
235
|
+
- - ">="
|
|
236
|
+
- !ruby/object:Gem::Version
|
|
237
|
+
hash: 3
|
|
238
|
+
segments:
|
|
239
|
+
- 0
|
|
240
|
+
version: "0"
|
|
241
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
242
|
+
none: false
|
|
243
|
+
requirements:
|
|
244
|
+
- - ">"
|
|
245
|
+
- !ruby/object:Gem::Version
|
|
246
|
+
hash: 25
|
|
247
|
+
segments:
|
|
248
|
+
- 1
|
|
249
|
+
- 3
|
|
250
|
+
- 1
|
|
251
|
+
version: 1.3.1
|
|
208
252
|
requirements: []
|
|
253
|
+
|
|
209
254
|
rubyforge_project:
|
|
210
|
-
rubygems_version:
|
|
255
|
+
rubygems_version: 1.8.25
|
|
211
256
|
signing_key:
|
|
212
|
-
specification_version:
|
|
257
|
+
specification_version: 3
|
|
213
258
|
summary: Ruby wrapper for the StreamSend API.
|
|
214
|
-
test_files:
|
|
215
|
-
- spec/integration/account_spec.rb
|
|
216
|
-
- spec/
|
|
217
|
-
- spec/integration/
|
|
218
|
-
- spec/integration/
|
|
219
|
-
- spec/integration/
|
|
220
|
-
- spec/integration/
|
|
221
|
-
- spec/integration/
|
|
222
|
-
- spec/lib/streamsend/api/
|
|
223
|
-
- spec/lib/streamsend/api/
|
|
224
|
-
- spec/lib/streamsend/api/
|
|
225
|
-
- spec/lib/streamsend/api/
|
|
226
|
-
- spec/lib/streamsend/
|
|
259
|
+
test_files:
|
|
260
|
+
- spec/lib/streamsend/api/integration/account_spec.rb
|
|
261
|
+
- spec/lib/streamsend/api/integration/audience_spec.rb
|
|
262
|
+
- spec/lib/streamsend/api/integration/blast_spec.rb
|
|
263
|
+
- spec/lib/streamsend/api/integration/bounce_spec.rb
|
|
264
|
+
- spec/lib/streamsend/api/integration/click_spec.rb
|
|
265
|
+
- spec/lib/streamsend/api/integration/email_spec.rb
|
|
266
|
+
- spec/lib/streamsend/api/integration/field_option_spec.rb
|
|
267
|
+
- spec/lib/streamsend/api/integration/field_spec.rb
|
|
268
|
+
- spec/lib/streamsend/api/integration/filter_spec.rb
|
|
269
|
+
- spec/lib/streamsend/api/integration/from_email_address_spec.rb
|
|
270
|
+
- spec/lib/streamsend/api/integration/helpers.rb
|
|
271
|
+
- spec/lib/streamsend/api/integration/import_spec.rb
|
|
272
|
+
- spec/lib/streamsend/api/integration/link_spec.rb
|
|
273
|
+
- spec/lib/streamsend/api/integration/list_spec.rb
|
|
274
|
+
- spec/lib/streamsend/api/integration/membership_spec.rb
|
|
275
|
+
- spec/lib/streamsend/api/integration/person_spec.rb
|
|
276
|
+
- spec/lib/streamsend/api/integration/unsubscribe_spec.rb
|
|
277
|
+
- spec/lib/streamsend/api/integration/upload_spec.rb
|
|
278
|
+
- spec/lib/streamsend/api/integration/user_spec.rb
|
|
279
|
+
- spec/lib/streamsend/api/integration/view_spec.rb
|
|
280
|
+
- spec/lib/streamsend/api/unit/base/base_call_spec.rb
|
|
281
|
+
- spec/lib/streamsend/api/unit/base/create_spec.rb
|
|
282
|
+
- spec/lib/streamsend/api/unit/base/destroy_spec.rb
|
|
283
|
+
- spec/lib/streamsend/api/unit/base/index_spec.rb
|
|
284
|
+
- spec/lib/streamsend/api/unit/base/show_spec.rb
|
|
285
|
+
- spec/lib/streamsend/api/unit/base/update_spec.rb
|
|
286
|
+
- spec/lib/streamsend/api/unit/blast_spec.rb
|
|
287
|
+
- spec/lib/streamsend/api/unit/bounce_spec.rb
|
|
288
|
+
- spec/lib/streamsend/api/unit/click_spec.rb
|
|
289
|
+
- spec/lib/streamsend/api/unit/field_option_spec.rb
|
|
290
|
+
- spec/lib/streamsend/api/unit/from_email_address_spec.rb
|
|
291
|
+
- spec/lib/streamsend/api/unit/link_spec.rb
|
|
292
|
+
- spec/lib/streamsend/api/unit/list_spec.rb
|
|
293
|
+
- spec/lib/streamsend/api/unit/membership_spec.rb
|
|
294
|
+
- spec/lib/streamsend/api/unit/person_spec.rb
|
|
295
|
+
- spec/lib/streamsend/api/unit/result_spec.rb
|
|
296
|
+
- spec/lib/streamsend/api/unit/session_spec.rb
|
|
297
|
+
- spec/lib/streamsend/api/unit/unsubscribe_spec.rb
|
|
298
|
+
- spec/lib/streamsend/api/unit/user_spec.rb
|
|
227
299
|
- spec/spec_helper.rb
|
checksums.yaml
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
SHA1:
|
|
3
|
-
metadata.gz: 5e41691af38b21804f3ae360a1ba2dec326e7090
|
|
4
|
-
data.tar.gz: 2f7a0ac3bd573ac8b6ff95e36c746dcc01b23aef
|
|
5
|
-
SHA512:
|
|
6
|
-
metadata.gz: 365a2fb216e108448b924e9c16578bcc266f0c4894132fd4deda97a82718fe996bf8e2e8338cd4b4c62bce3de31d578e1f0d5788220921722fb7fe6bb8405b49
|
|
7
|
-
data.tar.gz: d665fd2f40151ec996cacb85af23daaaba5689d98b7b615e02c80169c91df3ce380a01821d8809f3e2cb463e33f835f38c406f1f3680a9987fe5f6de3d299631
|
data/.pair
DELETED
data/README.rdoc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Ruby wrapper for the StreamSend API.
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
require File.expand_path(__FILE__, "exception")
|
|
2
|
-
|
|
3
|
-
module StreamSend
|
|
4
|
-
module Api
|
|
5
|
-
class Resource
|
|
6
|
-
def initialize(data)
|
|
7
|
-
@data = data
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def method_missing(method, *args, &block)
|
|
11
|
-
if @data.include?(method.to_s)
|
|
12
|
-
@data[method.to_s]
|
|
13
|
-
else
|
|
14
|
-
super
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def id
|
|
19
|
-
@data["id"]
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def self.clear_audience
|
|
23
|
-
@audience_id = nil
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def self.audience_id
|
|
27
|
-
if @audience_id.nil?
|
|
28
|
-
audiences_repsonse = StreamSend::Api.get("/audiences.xml")
|
|
29
|
-
audiences_entity = audiences_repsonse.parsed_response
|
|
30
|
-
audiences = audiences_entity["audiences"]
|
|
31
|
-
if audiences_entity["audiences"].nil?
|
|
32
|
-
raise StreamSend::Api::Exception.new("Invalid response when fetching audience. Are your credentials valid?")
|
|
33
|
-
end
|
|
34
|
-
audience = audiences.first
|
|
35
|
-
@audience_id = audience["id"]
|
|
36
|
-
end
|
|
37
|
-
@audience_id
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
require File.expand_path(__FILE__, "exception")
|
|
2
|
-
|
|
3
|
-
module StreamSend
|
|
4
|
-
module Api
|
|
5
|
-
class Subscriber < Resource
|
|
6
|
-
def self.all
|
|
7
|
-
options = { :per_page => 1_000, :page => 0 }
|
|
8
|
-
last_gathered_count = 1
|
|
9
|
-
sbuscribers = []
|
|
10
|
-
|
|
11
|
-
until last_gathered_count == 0
|
|
12
|
-
gathered = self.index( options )
|
|
13
|
-
subscribers.concat( gathered )
|
|
14
|
-
options[:page] = options[:page]+1
|
|
15
|
-
last_gathered_count = gatehred.count
|
|
16
|
-
end
|
|
17
|
-
subscribers
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def self.index(options = {})
|
|
21
|
-
response = StreamSend::Api.get("/audiences/#{audience_id}/people.xml", :query => options)
|
|
22
|
-
|
|
23
|
-
case response.code
|
|
24
|
-
when 200
|
|
25
|
-
response["people"].collect { |data| new(data) }
|
|
26
|
-
else
|
|
27
|
-
raise StreamSend::Api::ApiException.new("Error response (#{response.code}), Make sure your audience ID is correct. (audience_id => #{audience_id})")
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def self.find(email_address)
|
|
32
|
-
response = StreamSend::Api.get("/audiences/#{audience_id}/people.xml?email_address=#{email_address}")
|
|
33
|
-
|
|
34
|
-
case response.code
|
|
35
|
-
when 200
|
|
36
|
-
if subscriber = response["people"].first
|
|
37
|
-
new(subscriber)
|
|
38
|
-
else
|
|
39
|
-
nil
|
|
40
|
-
end
|
|
41
|
-
else
|
|
42
|
-
raise StreamSend::Api::Exception.new("Could not find the subscriber. Make sure your audience ID is correct. (#{response.code})")
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def self.create(person_hash)
|
|
47
|
-
response = StreamSend::Api.post("/audiences/#{audience_id}/people.xml", :query => {:person => person_hash})
|
|
48
|
-
|
|
49
|
-
case response.code
|
|
50
|
-
when 201
|
|
51
|
-
response.headers["location"] =~ /audiences\/\d+\/people\/(\d+)$/
|
|
52
|
-
subscriber_id = $1
|
|
53
|
-
unless subscriber_id.nil?
|
|
54
|
-
subscriber_id.to_i
|
|
55
|
-
end
|
|
56
|
-
when 422
|
|
57
|
-
raise StreamSend::Api::SemanticException.new(response["errors"]["error"])
|
|
58
|
-
else
|
|
59
|
-
raise StreamSend::Api::Exception.new("Could not create the subscriber. (#{response.code})")
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
def show
|
|
64
|
-
response = StreamSend::Api.get("/audiences/#{audience_id}/people/#{id}.xml")
|
|
65
|
-
|
|
66
|
-
case response.code
|
|
67
|
-
when 200
|
|
68
|
-
if subscriber = response["person"]
|
|
69
|
-
self.class.new(subscriber)
|
|
70
|
-
else
|
|
71
|
-
nil
|
|
72
|
-
end
|
|
73
|
-
else
|
|
74
|
-
raise StreamSend::Api::Exception.new("Could not show the subscriber. (#{response.code})")
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
def activate
|
|
79
|
-
response = StreamSend::Api.post("/audiences/#{audience_id}/people/#{id}/activate.xml")
|
|
80
|
-
|
|
81
|
-
case response.code
|
|
82
|
-
when 200
|
|
83
|
-
true
|
|
84
|
-
else
|
|
85
|
-
raise StreamSend::Api::Exception.new("Could not activate the subscriber. (#{response.code})")
|
|
86
|
-
end
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
def unsubscribe
|
|
90
|
-
response = StreamSend::Api.post("/audiences/#{audience_id}/people/#{id}/unsubscribe.xml")
|
|
91
|
-
|
|
92
|
-
case response.code
|
|
93
|
-
when 200
|
|
94
|
-
true
|
|
95
|
-
else
|
|
96
|
-
raise StreamSend::Api::Exception("Could not subscribe the subscriber. (#{response.code})")
|
|
97
|
-
end
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
def destroy
|
|
101
|
-
response = StreamSend::Api.delete("/audiences/#{audience_id}/people/#{id}.xml")
|
|
102
|
-
case response.code
|
|
103
|
-
when 200
|
|
104
|
-
true
|
|
105
|
-
when 423
|
|
106
|
-
raise LockedError, "Can not delete"
|
|
107
|
-
else
|
|
108
|
-
raise UnexpectedResponse, response.code
|
|
109
|
-
end
|
|
110
|
-
end
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
end
|