freshmail 0.1.5 → 0.1.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4ab3ddb6aac99c5f4ab9d37c25f2971babadb5b
4
- data.tar.gz: 9d89a03964c47ffedfd55978d020543b6c763b79
3
+ metadata.gz: 14e23a4b6337b39a26b7b336d0cba51fc002161c
4
+ data.tar.gz: dbb716e21359a6f19abfae680ccf94d2a625f0cc
5
5
  SHA512:
6
- metadata.gz: a99b9fd2597bb71daf791da03553131073f3e7412fab9a3e655aa1b70f6273d6076359cc8da16e849c786e835c98f2743b9c1a340c0118b83560f136aa82ea90
7
- data.tar.gz: 5aaf9b0e2dba57eb4856553e4c46b84c80b520817d176f68c19d9b4661e87a21cb2dbcc26b8c438376d6ef94c0d6c12543ffa05d49893cd1ceebcaa6d98de5ee
6
+ metadata.gz: 241c0829dcfe4738f45c33c75f25f7f499da0dad7cfe67d61616e8f29171bb5b37b2c98262367148cf247f739d83b19933aeb5be24de7480da11ceafc6e0aefa
7
+ data.tar.gz: 3a3e312e8b52553be3c17fae72afda9fe894caa79ec61332ee1b4451835bb8446a1234d24332b5ce6d3a6f4eb00d2f22a3b3924ad86ee8fdfda711a622437d22
@@ -25,7 +25,7 @@ module Freshmail
25
25
  def subscriber(sub_info = {})
26
26
  list = sub_info[:list]
27
27
  email = sub_info[:email]
28
-
28
+
29
29
  call_freshmail(:get, "subscriber/get/#{list}/#{email}")
30
30
  end
31
31
 
@@ -37,6 +37,10 @@ module Freshmail
37
37
  call_freshmail(:post, 'subscriber/add', sub_info)
38
38
  end
39
39
 
40
+ def edit_subscriber(sub_info = {})
41
+ call_freshmail(:post, 'subscriber/edit', sub_info)
42
+ end
43
+
40
44
  def batch_add_subscriber(sub_info = {})
41
45
  call_freshmail(:post, 'subscriber/addMultiple', sub_info)
42
46
  end
@@ -67,13 +71,13 @@ module Freshmail
67
71
 
68
72
  protected
69
73
  def call_freshmail(call_type, get_data, json_data = nil)
70
- json_data_converted = json_data ? json_data.to_json : ''
74
+ json_data_converted = json_data ? json_data.to_json : ''
71
75
  endpoint = "/rest/#{get_data}"
72
76
 
73
77
  conn = Faraday.new(:url => URL) do |faraday|
74
- faraday.request :url_encoded
75
- # faraday.response :logger
76
- faraday.adapter Faraday.default_adapter
78
+ faraday.request :url_encoded
79
+ # faraday.response :logger
80
+ faraday.adapter Faraday.default_adapter
77
81
  end
78
82
 
79
83
  response = conn.send(call_type) do |req|
@@ -96,4 +100,4 @@ module Freshmail
96
100
  ].join
97
101
  end
98
102
  end
99
- end
103
+ end
@@ -1,3 +1,3 @@
1
1
  module Freshmail
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freshmail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Jan Adamczyk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-15 00:00:00.000000000 Z
11
+ date: 2015-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails