sailthru-client 1.05 → 1.06

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +17 -1
  2. data/lib/sailthru.rb +1 -18
  3. metadata +3 -3
data/README.md CHANGED
@@ -66,7 +66,7 @@ Examples
66
66
 
67
67
  ### [blast](http://docs.sailthru.com/api/blast)
68
68
 
69
- # schedule blast
69
+ #schedule blast
70
70
  blast_name = 'My blast name'
71
71
  template = 'my-template'
72
72
  schedule_time = '+5 hours'
@@ -77,6 +77,22 @@ Examples
77
77
  text = 'Lorem ispum is great'
78
78
  response = sailthru.schedule_blast(blast_name, template, schedule_time, from_name, from_email, subject, html, text)
79
79
 
80
+ #schedule blast from template
81
+ template = 'default'
82
+ list = 'default'
83
+ schdule_time = 'now'
84
+ response = sailthru.schedule_blast_from_template(template, list, schedule_time)
85
+
86
+ #schedule blast from previous blast
87
+ blast_id = 67535
88
+ schedule_time ='now'
89
+ vars = {
90
+ 'my_var' => '3y6366546363',
91
+ 'my_var2' => [7,8,9],
92
+ 'my_var3' => {'president' => 'obama', 'nested' => {'vp' => 'palin'}}
93
+ }
94
+ response = sailthru.schedule_blast_from_blast(blast_id, "now", vars)
95
+
80
96
  #update blast
81
97
  blast_id = 7886
82
98
  name = 'prajwal tuladhar 64'
data/lib/sailthru.rb CHANGED
@@ -7,7 +7,7 @@ require 'digest/md5'
7
7
 
8
8
  module Sailthru
9
9
 
10
- Version = VERSION = '1.05'
10
+ Version = VERSION = '1.06'
11
11
 
12
12
  class SailthruClientException < Exception
13
13
  end
@@ -218,23 +218,6 @@ module Sailthru
218
218
  post[:schedule_time] = schedule_time
219
219
  api_post(:blast, post)
220
220
  end
221
-
222
- def schedule_blast_from_copy(copy_blast = nil, copy_template = nil, options = {})
223
- if copy_blast.nil? and copy_template.nil?
224
- raise SailthruClientException.new('copy_blast and copy_template are both null')
225
- end
226
-
227
- post = options ? options : {}
228
- if copy_blast != nil
229
- post[:copy_blast] = copy_blast
230
- end
231
-
232
- if copy_template != nil
233
- post[:copy_template] = copy_template
234
- end
235
-
236
- api_post(:blast, post)
237
- end
238
221
 
239
222
 
240
223
  # params
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sailthru-client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 5
9
- version: "1.05"
8
+ - 6
9
+ version: "1.06"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Prajwal Tuladhar