live_paper 0.0.3 → 0.0.4
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 +4 -4
- data/README.md +3 -3
- data/lib/live_paper/version.rb +1 -1
- data/lib/live_paper.rb +4 -4
- 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: b91be1f07200bdb505c4bbf6cbb2b807e8db92dd
|
4
|
+
data.tar.gz: 6e2d6543c8d6d814bfd6305a528ce004615712f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f772a5e16a230689b1d20b0ce5203e97e34c163af48a6d2745fb0ba154efa7f44951ab7e9cb7464829e448252b6666b11ace4d01f5a635cef7c4b5f9c6359095
|
7
|
+
data.tar.gz: 9532f9968d5a35178791c516f99331030484a817c7b465a263ffd0d7cd27257ac70730ca42441870d35361576267148c743ac71afd7d86cc1a8dc0e5b86820bf
|
data/README.md
CHANGED
@@ -30,7 +30,7 @@ In order to obtain access credentials register here: https://link.livepaperdeve
|
|
30
30
|
Live Paper gem requires an authentication hash with :id and :secret. Obtain your credentials from the registration link above.
|
31
31
|
|
32
32
|
```ruby
|
33
|
-
lp = LivePaper.auth id: "your client id", secret: "your client secret"
|
33
|
+
lp = LivePaper.auth 'id': "your client id", 'secret': "your client secret"
|
34
34
|
```
|
35
35
|
|
36
36
|
|
@@ -54,8 +54,8 @@ qr_bytes = lp.qr_bytes('http://www.amazon.com')
|
|
54
54
|
|
55
55
|
```ruby
|
56
56
|
wm_bytes = lp.watermark_bytes("http://www.hp.com",
|
57
|
-
"
|
58
|
-
File.open("watermark.jpg", "w") { |f| f.write(wm_bytes) }
|
57
|
+
"http://www.letsstartsmall.com/ITSE2313_WebAuthoring/images/unit3/jpg_example1.jpg")
|
58
|
+
File.open("watermark.jpg", "w:UTF-8") { |f| f.write(wm_bytes.force_encoding("UTF-8")) }
|
59
59
|
```
|
60
60
|
|
61
61
|
> Note: Version 1 of the API only supports returning image bytes. Version 2 may host publicly accessible images.
|
data/lib/live_paper/version.rb
CHANGED
data/lib/live_paper.rb
CHANGED
@@ -89,9 +89,9 @@ module LivePaper
|
|
89
89
|
def trigger(type="shorturl", options={})
|
90
90
|
body = {
|
91
91
|
trigger: {
|
92
|
-
name: "
|
92
|
+
name: "trigger",
|
93
93
|
type: type,
|
94
|
-
expiryDate: Time.now + (365 * 24 * 60 *60)
|
94
|
+
expiryDate: Time.now + (365 * 24 * 60 * 60)
|
95
95
|
}.merge(options)
|
96
96
|
}
|
97
97
|
create_resource('trigger', body)
|
@@ -100,7 +100,7 @@ module LivePaper
|
|
100
100
|
def url_payoff(dest)
|
101
101
|
body = {
|
102
102
|
payoff: {
|
103
|
-
name: "
|
103
|
+
name: "payoff",
|
104
104
|
URL: dest
|
105
105
|
}
|
106
106
|
}
|
@@ -110,7 +110,7 @@ module LivePaper
|
|
110
110
|
def link(trigger, payoff)
|
111
111
|
body = {
|
112
112
|
link: {
|
113
|
-
name: "
|
113
|
+
name: "link",
|
114
114
|
payoffId: payoff["id"],
|
115
115
|
triggerId: trigger["id"]
|
116
116
|
}
|