gibbon 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of gibbon might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 058e8dd55929077028198eff684cd01a0db75aa1
4
- data.tar.gz: b4f87543f0f61d79480fd89180c22cded7619324
3
+ metadata.gz: f00a068a4e2a554c2baba80e7a0a01f934a4714a
4
+ data.tar.gz: 96a6a231054b51595e19feeb0c24c31f09078cb5
5
5
  SHA512:
6
- metadata.gz: c047faddffd7dbf8b9a960f52a40d6011db6adb8bb20ce1f753d09911f61afe63e8e3449e999fa4da925f4f022383bef5109a8b4bc1061d1c69b2135479c479d
7
- data.tar.gz: afe96d02ac443225351ed428bdf23e885d1e20fa3a4f2712438b25ceabd1a2765a3317f98a391b397bc888db8aaccb21e7e3ddfcab6200f4425bd5ad064ab32b
6
+ metadata.gz: 3b95d0ca9fdcb7477c34b8c3aa2ecd1c46715ebd5d41ecd226ea60ef8c57a69d61a135921e9187d8e38800b9040f1a46a928ac8c4fa3147f5115dd885c5ee91d
7
+ data.tar.gz: 6fbe89f8c22ca9be5864f5d388fdc9525b8a6636f343f40f2a38b80b36f4e56b515fbb79dcc40bac126029e1ee7fde04032e68c548b9984f8f141e3c35bb1aa0
@@ -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})
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "gibbon"
6
- s.version = "1.0.2"
6
+ s.version = "1.0.3"
7
7
  s.authors = ["Amro Mousa"]
8
8
  s.email = ["amromousa@gmail.com"]
9
9
  s.homepage = "http://github.com/amro/gibbon"
@@ -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?
@@ -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.2
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-17 00:00:00.000000000 Z
11
+ date: 2013-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty