live_paper 0.0.12 → 0.0.13
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 +2 -4
- data/lib/live_paper/base_object.rb +3 -1
- data/lib/live_paper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d263eee26996dd3f13c1da9e6a248febe38254e
|
|
4
|
+
data.tar.gz: fb769ff8007deab3c6fc2be5ebae3f883993d8fd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2125d2363ff676e2de5b7b1d2a0e08b4f718883a6f4f6238ed974500b56c566ca422ed1461e6e238629fb81ef020282f4568a46ee6aeb4c4efc87a9cddd9dd50
|
|
7
|
+
data.tar.gz: 6df54c047f502e725096e876a964b6ec528a127544b059cd1fd5e7576e7aff1809aa6ecd305694e4c138902c8f3591d07b74cf42bd479ed75017adae2dc16b01
|
data/README.md
CHANGED
|
@@ -21,13 +21,13 @@ Or install it yourself as:
|
|
|
21
21
|
|
|
22
22
|
## Register with the Live Paper Service
|
|
23
23
|
|
|
24
|
-
In order to
|
|
24
|
+
In order to generate access credentials, register here: https://www.linkcreationstudio.com
|
|
25
25
|
|
|
26
26
|
## Usage
|
|
27
27
|
|
|
28
28
|
### Authenticate
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
The live_paper gem requires authentication. Obtain your credentials from https://www.linkcreationstudio.com/api/libraries/ruby/
|
|
31
31
|
|
|
32
32
|
```ruby
|
|
33
33
|
lp = LivePaper.auth({id: "your client id", secret: "your client secret"})
|
|
@@ -48,8 +48,6 @@ qr_bytes = lp.qr_bytes('http://www.amazon.com')
|
|
|
48
48
|
File.open("qr.png", "w") { |f| f.write(qr_bytes) }
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
> Note: Version 1 of the API only supports returning QR Code bytes. Version 2 may host publicly accessible QR images.
|
|
52
|
-
|
|
53
51
|
### Watermarking Images
|
|
54
52
|
|
|
55
53
|
```ruby
|
|
@@ -80,10 +80,12 @@ module LivePaper
|
|
|
80
80
|
response_code = nil
|
|
81
81
|
if self.id
|
|
82
82
|
BaseObject.request_handling_auth("#{self.class.api_url}/#{id}", 'DELETE') do |request|
|
|
83
|
-
response = BaseObject.send_request(request, content_type: 'application/json', allow_codes: [200, 409])
|
|
83
|
+
response = BaseObject.send_request(request, content_type: 'application/json', allow_codes: [200, 204, 409])
|
|
84
84
|
response_code = case response.code.to_i
|
|
85
85
|
when 200
|
|
86
86
|
'OK'
|
|
87
|
+
when 204
|
|
88
|
+
'OK'
|
|
87
89
|
when 409
|
|
88
90
|
@errors=response.body
|
|
89
91
|
'Conflict'
|
data/lib/live_paper/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: live_paper
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike Whitmarsh
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-11-
|
|
12
|
+
date: 2014-11-08 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rest-client
|