gibbon 1.0.2 → 1.0.3
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.
Potentially problematic release.
This version of gibbon might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.markdown +7 -1
- data/gibbon.gemspec +1 -1
- data/lib/gibbon/api_category.rb +8 -0
- data/spec/gibbon/gibbon_spec.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f00a068a4e2a554c2baba80e7a0a01f934a4714a
|
4
|
+
data.tar.gz: 96a6a231054b51595e19feeb0c24c31f09078cb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b95d0ca9fdcb7477c34b8c3aa2ecd1c46715ebd5d41ecd226ea60ef8c57a69d61a135921e9187d8e38800b9040f1a46a928ac8c4fa3147f5115dd885c5ee91d
|
7
|
+
data.tar.gz: 6fbe89f8c22ca9be5864f5d388fdc9525b8a6636f343f40f2a38b80b36f4e56b515fbb79dcc40bac126029e1ee7fde04032e68c548b9984f8f141e3c35bb1aa0
|
data/README.markdown
CHANGED
@@ -102,10 +102,16 @@ or
|
|
102
102
|
|
103
103
|
Batch subscribe members to a list:
|
104
104
|
|
105
|
-
gb.lists.batch_subscribe(:id => list_id, :batch => [{:EMAIL => "email1", :FNAME => "FirstName1", :LNAME => "LastName1"},{:EMAIL => "email2", :FNAME => "FirstName2", :LNAME => "LastName2"}])
|
105
|
+
gb.lists.batch_subscribe(:id => list_id, :batch => [{:EMAIL => {:email => "email1"}, :FNAME => "FirstName1", :LNAME => "LastName1"},{:EMAIL => {:email =>"email2"}, :FNAME => "FirstName2", :LNAME => "LastName2"}])
|
106
106
|
|
107
107
|
> Note: This will send welcome emails to the new subscribers
|
108
108
|
|
109
|
+
If you want to update the existing members you need to send the boolean update_existing in true
|
110
|
+
|
111
|
+
gb.lists.batch_subscribe(:id => list_id, :batch => [{:EMAIL => {:email => "email1"}, :FNAME => "FirstName1", :LNAME => "LastName1"}], :update_existing => true)
|
112
|
+
|
113
|
+
> On :EMAIL you can send the :euid (the unique id for an email address) or the :leid (the list email id) too, instead :email.
|
114
|
+
|
109
115
|
Fetch recipients who opened particular campaign:
|
110
116
|
|
111
117
|
email_stats = gb.reports.opened({:cid => campaign_id})
|
data/gibbon.gemspec
CHANGED
data/lib/gibbon/api_category.rb
CHANGED
@@ -44,6 +44,14 @@ module Gibbon
|
|
44
44
|
method = method.to_s.gsub("_", "-").downcase
|
45
45
|
call("#{@category_name}/#{method}", *args)
|
46
46
|
end
|
47
|
+
|
48
|
+
def send(*args)
|
49
|
+
if ((args.length > 0) && args[0].is_a?(Hash))
|
50
|
+
method_missing(:send, args[0])
|
51
|
+
else
|
52
|
+
__send__(args)
|
53
|
+
end
|
54
|
+
end
|
47
55
|
|
48
56
|
def set_instance_defaults
|
49
57
|
@timeout = (API.timeout || 30) if @timeout.nil?
|
data/spec/gibbon/gibbon_spec.rb
CHANGED
@@ -193,6 +193,11 @@ describe Gibbon do
|
|
193
193
|
Gibbon::APICategory.stub(:post).and_return(Struct.new(:body).new(nil))
|
194
194
|
expect(@gibbon.say.hello).to be_nil
|
195
195
|
end
|
196
|
+
|
197
|
+
it "can send a campaign" do
|
198
|
+
Gibbon::APICategory.stub(:post).and_return(Struct.new(:body).new(MultiJson.dump({"cid" => "1234567"})))
|
199
|
+
expect(@gibbon.campaigns.send({"cid" => "1234567"})).to eq({"cid" => "1234567"})
|
200
|
+
end
|
196
201
|
end
|
197
202
|
|
198
203
|
describe "export API" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gibbon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amro Mousa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|