glossyapp 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b81a58626a980621af1fd56da035bf13b8b9c1f0
4
- data.tar.gz: 4b47246d7b0f33686e476ac72218b32fa72871d8
3
+ metadata.gz: 7883e4236723bd664cc989af7d5f0bd0ee065126
4
+ data.tar.gz: 0217949244cfd0e63510428f3479bf761035a87b
5
5
  SHA512:
6
- metadata.gz: d62589b36ec8529c91218e0891fb1b65aeb0c1d3d2611386cf1bd84d549ae0c4dd67b67591fee96e555248880af01ecb20b644059b9070ec0ca2fc00d203f408
7
- data.tar.gz: aaba54ff0b9499435a4c12c2d8294b7f48e99025d107bd48fb4ae04e33f6d25b9a118602299102117935f1fa0273a1e88ec35b3e84014afa76acd05d128ba705
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)
@@ -1,3 +1,3 @@
1
1
  module GlossyApp
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
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.5
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-08-04 00:00:00.000000000 Z
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.6
129
+ rubygems_version: 2.4.8
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: Ruby Wrapper for the GlossyApp API.