rssendy 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +4 -0
- data/Rakefile +4 -0
- data/bin/rssendy +1 -1
- data/lib/rssendy/version.rb +1 -1
- data/lib/rssendy.rb +20 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35b3365c604f7421fa17cff71495ad9eb176cc9d
|
4
|
+
data.tar.gz: f4e6386f2c64705c39ee7f4aed1125d5f4493241
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3267f8ca9e712a8c1055a3a03120166783ad4193d8375b5c6143440502a76d16019429cbe5361a3b1ddf953afa6b5bec5abbd60ab25abc16cd3d50561fc79821
|
7
|
+
data.tar.gz: 3b73e16f3d873705194fc39ceaf6d0ef0cb5005dd6b9398957bb862643a7cfa946277ffd3734fd11aa3823c74fc86dc778665a2a1a590f85a2b8010890d6f5c3
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Rakefile
CHANGED
data/bin/rssendy
CHANGED
data/lib/rssendy/version.rb
CHANGED
data/lib/rssendy.rb
CHANGED
@@ -5,6 +5,26 @@ require "open-uri"
|
|
5
5
|
require "cindy"
|
6
6
|
require "erb"
|
7
7
|
|
8
|
+
Cindy::Client.class_eval do
|
9
|
+
def create_campaign(opts={})
|
10
|
+
post_opts = {}
|
11
|
+
req_opts = %i(from_name from_email reply_to subject html_text)
|
12
|
+
optional_opts = %i(plain_text list_ids brand_id send_campaign)
|
13
|
+
|
14
|
+
req_opts.each do |opt|
|
15
|
+
post_opts[opt] = opts.delete(opt) || raise(ArgumentError, "opt :#{opt} required")
|
16
|
+
end
|
17
|
+
post_opts.merge!(Hash[optional_opts.zip(opts.values_at(*optional_opts))])
|
18
|
+
post_opts[:api_key] = @key
|
19
|
+
|
20
|
+
response = connection.post "api/campaigns/create.php" do |req|
|
21
|
+
req.body = post_opts
|
22
|
+
end
|
23
|
+
|
24
|
+
response.body
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
8
28
|
module RSSendy
|
9
29
|
class Feed
|
10
30
|
PROPERTIES = %i{
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rssendy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jonah honeyman
|
@@ -105,6 +105,7 @@ extra_rdoc_files: []
|
|
105
105
|
files:
|
106
106
|
- ".gitignore"
|
107
107
|
- ".rspec"
|
108
|
+
- ".travis.yml"
|
108
109
|
- Gemfile
|
109
110
|
- LICENSE.txt
|
110
111
|
- README.md
|