boxview 0.0.8 → 0.0.9
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/lib/boxview.rb +6 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7435dea926cea2b7dc3c06afcc32feed764737a8
|
4
|
+
data.tar.gz: 52f26dae70d99ac0f86e4f533d17fc64d23d1993
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 616581970e5a5e194a51454855201361c2f98727c97ad508bbc46c8d5d852e736d67008f6fb20fbcc36ec14f43984b85288778dc7f3214b93631e8783e0b4d35
|
7
|
+
data.tar.gz: 031543cbd2acb6efec7393d1177f4aa6468b8e12bf081f9c430fecfad62f67de6b001c3ec5d6463e7ec6e6c9d51d2489b251069248e698cf87075c79215ed994
|
data/lib/boxview.rb
CHANGED
@@ -20,13 +20,14 @@ module BoxView
|
|
20
20
|
end
|
21
21
|
|
22
22
|
module Documents
|
23
|
-
# attributes:
|
23
|
+
# attributes: "url" "name" "thumbnails" and "non_svg"
|
24
24
|
# url: string with url of a document in the cloud
|
25
|
+
# name: name of document
|
25
26
|
# thumbnails: string with widthxheight dimensions "128x128,256x256"
|
27
|
+
# non_svg: false by default, true if you want to support < ie9 aka non svg browsers
|
26
28
|
def self.create attributes
|
27
29
|
BoxView.connection.post do |request|
|
28
30
|
request.url "documents"
|
29
|
-
attributes = { "url" => attributes[:url], "thumbnails" => attributes[:thumbnails] }
|
30
31
|
request.body = attributes.to_json
|
31
32
|
end
|
32
33
|
end
|
@@ -52,10 +53,11 @@ module BoxView
|
|
52
53
|
|
53
54
|
module Sessions
|
54
55
|
def self.create document_id
|
55
|
-
BoxView.connection.post do |request|
|
56
|
+
response = BoxView.connection.post do |request|
|
56
57
|
request.url "sessions"
|
57
|
-
request.body = '{"document_id": "' + document_id + '"}'
|
58
|
+
request.body = '{"document_id": "' + document_id.to_s + '"}'
|
58
59
|
end
|
60
|
+
re
|
59
61
|
end
|
60
62
|
end
|
61
63
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boxview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyrus Karbassiyoon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Wrapper for box view api
|
42
|
-
email:
|
42
|
+
email: cyrus@cycleio.com
|
43
43
|
executables: []
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
64
|
version: '0'
|
65
65
|
requirements: []
|
66
66
|
rubyforge_project:
|
67
|
-
rubygems_version: 2.
|
67
|
+
rubygems_version: 2.2.2
|
68
68
|
signing_key:
|
69
69
|
specification_version: 4
|
70
70
|
summary: Wrapper for box view api
|