glossyapp 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/glossyapp/session/pages.rb +17 -0
- data/lib/glossyapp/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7883e4236723bd664cc989af7d5f0bd0ee065126
|
4
|
+
data.tar.gz: 0217949244cfd0e63510428f3479bf761035a87b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8caa0f726a9e57d593cce8b51f532eb8da2d6afb980332b35f2f379bd53abb909f2ef81bf1b0ab13f7b645f57ea65f95d55a0b80271fb7f7bfb5b39e7c028c6
|
7
|
+
data.tar.gz: 816dfd630425a25b40e283737fe0d8f26483c57620cdbc2d5d23f564b177f1c8f7132152385841f7b6942570b0c75b264b41c7237cba711f1c50df8bd3525164
|
@@ -2,6 +2,23 @@ module GlossyApp
|
|
2
2
|
|
3
3
|
class Session
|
4
4
|
|
5
|
+
def set_external_id_for_page(document_id, page_id, external_id)
|
6
|
+
post_data = {
|
7
|
+
'page' => {
|
8
|
+
'external_id' => external_id
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
response = @glossy_api.put("/documents/#{document_id}/pages/#{page_id}", post_data.to_json, {"Content-Type" => "application/json"})
|
13
|
+
if [200, 201].include?(response.status)
|
14
|
+
return true
|
15
|
+
|
16
|
+
else
|
17
|
+
raise "Invalid response: #{response.inspect}\n#{response.body}"
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
5
22
|
def get_pages(document_id)
|
6
23
|
response = @glossy_api.get "/documents/#{document_id}/pages"
|
7
24
|
if [200].include?(response.status)
|
data/lib/glossyapp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glossyapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philipp Schmid
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
128
|
rubyforge_project:
|
129
|
-
rubygems_version: 2.4.
|
129
|
+
rubygems_version: 2.4.8
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: Ruby Wrapper for the GlossyApp API.
|