sendcloud_client 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/lib/sendcloud_client.rb +2 -2
- data/sendcloud_client.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 991c411e2376033d69e754eb9a29d4469c8034c8
|
4
|
+
data.tar.gz: 914a35a5d83cf275f6a9d9e52862ced66a8546e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8eddc8718f9cb4766c50bbeab913b4f58a646b02fa1dffe8d33f649f3701f553ff04eb33e0d493c803937f88807c6b349c5b4ca6ad2801b77c0fd4b4e6aa5b31
|
7
|
+
data.tar.gz: f1100ac4e305cc67a6270765ac49231934dbb3e6d219351b4305c72228b128ae0e55780e74347479b8cb4a84966e04e9528875e273b4ff720959f3c0369301a0
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
##
|
1
|
+
## Intro
|
2
2
|
|
3
|
-
|
3
|
+
已有的 sendcloud 东西太多, 接口升级不能用了. 这个只有25行
|
4
4
|
|
5
|
-
####
|
5
|
+
#### Usage
|
6
6
|
|
7
7
|
```
|
8
8
|
|
@@ -13,6 +13,6 @@ SendcloudClient.setup do |config|
|
|
13
13
|
config.api_key = 'yyy'
|
14
14
|
end
|
15
15
|
|
16
|
-
p SendcloudClient.sendmail(to: "
|
16
|
+
p SendcloudClient.sendmail(to: "xxx@gmail.com", from: "xxx", fromName: "SendCloud", subject: "xxx", html: "xxx")
|
17
17
|
|
18
|
-
```
|
18
|
+
```
|
data/lib/sendcloud_client.rb
CHANGED
@@ -17,8 +17,8 @@ module SendcloudClient
|
|
17
17
|
return if options[:to].length == 0
|
18
18
|
uri = "#{API_BASE}/mail/send"
|
19
19
|
res = RestClient.post uri, apiUser: SendcloudClient.api_user,
|
20
|
-
apiKey: SendcloudClient.api_key, to: options[:to], from: options[:from], fromName: options[:
|
21
|
-
subject: options[:
|
20
|
+
apiKey: SendcloudClient.api_key, to: options[:to], from: options[:from], fromName: options[fromName:],
|
21
|
+
subject: options[subject:], html: options[html:]
|
22
22
|
|
23
23
|
JSON.parse(res) rescue nil
|
24
24
|
end
|
data/sendcloud_client.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'sendcloud_client'
|
7
|
-
spec.version = '0.0.
|
7
|
+
spec.version = '0.0.2'
|
8
8
|
spec.authors = ['Alvin Ye']
|
9
9
|
spec.email = ['alvin.ye.cn@gmail.com']
|
10
10
|
spec.description = %q{ruby client for sohu sendcloud api v2}
|