groupdocs 1.6.0 → 1.7.0
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.
- data/CHANGELOG.md +34 -0
- data/LICENSE.txt +21 -0
- data/README.md +3 -0
- data/examples/api-samples/public/docs/sample01.html +23 -23
- data/examples/api-samples/public/docs/sample02.html +27 -27
- data/examples/api-samples/public/docs/sample03.html +81 -69
- data/examples/api-samples/public/docs/sample04.html +29 -29
- data/examples/api-samples/public/docs/sample05.html +48 -48
- data/examples/api-samples/public/docs/sample06.html +47 -46
- data/examples/api-samples/public/docs/sample07.html +35 -35
- data/examples/api-samples/public/docs/sample08.html +45 -45
- data/examples/api-samples/public/docs/sample09.html +57 -57
- data/examples/api-samples/public/docs/sample10.html +41 -41
- data/examples/api-samples/public/docs/sample11.html +96 -118
- data/examples/api-samples/public/docs/sample12.html +29 -50
- data/examples/api-samples/public/docs/sample13.html +36 -44
- data/examples/api-samples/public/docs/sample14.html +29 -29
- data/examples/api-samples/public/docs/sample15.html +24 -24
- data/examples/api-samples/public/docs/sample16.html +32 -32
- data/examples/api-samples/public/docs/sample17.html +38 -38
- data/examples/api-samples/public/docs/sample18.html +105 -101
- data/examples/api-samples/public/docs/sample19.html +101 -101
- data/examples/api-samples/public/docs/sample20.html +42 -42
- data/examples/api-samples/public/docs/sample21.html +109 -109
- data/examples/api-samples/public/docs/sample22.html +56 -56
- data/examples/api-samples/public/docs/sample23.html +39 -39
- data/examples/api-samples/public/docs/sample24.html +36 -36
- data/examples/api-samples/public/docs/sample25.html +67 -67
- data/examples/api-samples/public/docs/sample26.html +23 -23
- data/examples/api-samples/public/docs/sample27.html +72 -72
- data/examples/api-samples/public/docs/sample28.html +46 -45
- data/examples/api-samples/public/docs/sample29.html +30 -30
- data/examples/api-samples/public/docs/sample30.html +30 -30
- data/examples/api-samples/public/docs/sample31.html +114 -114
- data/examples/api-samples/public/docs/sample32.html +96 -96
- data/examples/api-samples/public/docs/sample33.html +56 -56
- data/examples/api-samples/public/docs/sample34.html +27 -27
- data/examples/api-samples/public/docs/sample35.html +134 -135
- data/examples/api-samples/public/docs/sample36.html +32 -32
- data/examples/api-samples/public/docs/sample37.html +103 -103
- data/examples/api-samples/public/docs/sample38.html +76 -76
- data/examples/api-samples/public/docs/sample39.html +136 -136
- data/examples/api-samples/public/docs/sample40.html +104 -104
- data/examples/api-samples/public/docs/sample41.html +137 -137
- data/examples/api-samples/public/docs/sample42.html +61 -61
- data/examples/api-samples/public/docs/sample43.html +72 -72
- data/examples/api-samples/public/docs/sample44.html +751 -0
- data/examples/api-samples/public/docs/sample45.html +236 -0
- data/examples/api-samples/public/templates/merge_field3_doc.docx +0 -0
- data/examples/api-samples/samples/sample01.rb +2 -2
- data/examples/api-samples/samples/sample02.rb +2 -2
- data/examples/api-samples/samples/sample03.rb +2 -2
- data/examples/api-samples/samples/sample04.rb +2 -2
- data/examples/api-samples/samples/sample05.rb +2 -2
- data/examples/api-samples/samples/sample06.rb +2 -2
- data/examples/api-samples/samples/sample07.rb +2 -2
- data/examples/api-samples/samples/sample08.rb +2 -2
- data/examples/api-samples/samples/sample09.rb +2 -2
- data/examples/api-samples/samples/sample10.rb +2 -2
- data/examples/api-samples/samples/sample11.rb +2 -2
- data/examples/api-samples/samples/sample12.rb +2 -2
- data/examples/api-samples/samples/sample13.rb +2 -2
- data/examples/api-samples/samples/sample14.rb +2 -2
- data/examples/api-samples/samples/sample15.rb +2 -2
- data/examples/api-samples/samples/sample16.rb +2 -2
- data/examples/api-samples/samples/sample17.rb +2 -2
- data/examples/api-samples/samples/sample18.rb +2 -2
- data/examples/api-samples/samples/sample19.rb +2 -2
- data/examples/api-samples/samples/sample20.rb +2 -2
- data/examples/api-samples/samples/sample21.rb +2 -2
- data/examples/api-samples/samples/sample22.rb +2 -2
- data/examples/api-samples/samples/sample23.rb +2 -2
- data/examples/api-samples/samples/sample24.rb +2 -2
- data/examples/api-samples/samples/sample25.rb +2 -2
- data/examples/api-samples/samples/sample26.rb +2 -2
- data/examples/api-samples/samples/sample27.rb +2 -2
- data/examples/api-samples/samples/sample28.rb +2 -2
- data/examples/api-samples/samples/sample29.rb +2 -2
- data/examples/api-samples/samples/sample30.rb +2 -2
- data/examples/api-samples/samples/sample31.rb +2 -2
- data/examples/api-samples/samples/sample32.rb +2 -2
- data/examples/api-samples/samples/sample33.rb +2 -2
- data/examples/api-samples/samples/sample34.rb +2 -2
- data/examples/api-samples/samples/sample35.rb +4 -4
- data/examples/api-samples/samples/sample36.rb +2 -2
- data/examples/api-samples/samples/sample37.rb +2 -2
- data/examples/api-samples/samples/sample38.rb +2 -2
- data/examples/api-samples/samples/sample39.rb +2 -2
- data/examples/api-samples/samples/sample40.rb +2 -2
- data/examples/api-samples/samples/sample41.rb +2 -2
- data/examples/api-samples/samples/sample42.rb +2 -2
- data/examples/api-samples/samples/sample43.rb +2 -2
- data/examples/api-samples/samples/sample44.rb +188 -0
- data/examples/api-samples/samples/sample45.rb +74 -0
- data/examples/api-samples/views/_others_samples.haml +47 -43
- data/examples/api-samples/views/index.haml +55 -44
- data/examples/api-samples/views/layout.haml +1 -6
- data/examples/api-samples/views/sample01.haml +62 -57
- data/examples/api-samples/views/sample02.haml +52 -46
- data/examples/api-samples/views/sample03.haml +78 -73
- data/examples/api-samples/views/sample04.haml +51 -45
- data/examples/api-samples/views/sample05.haml +77 -71
- data/examples/api-samples/views/sample06.haml +58 -52
- data/examples/api-samples/views/sample07.haml +51 -45
- data/examples/api-samples/views/sample08.haml +90 -84
- data/examples/api-samples/views/sample09.haml +86 -80
- data/examples/api-samples/views/sample10.haml +83 -77
- data/examples/api-samples/views/sample11.haml +124 -120
- data/examples/api-samples/views/sample12.haml +65 -59
- data/examples/api-samples/views/sample13.haml +62 -56
- data/examples/api-samples/views/sample14.haml +57 -51
- data/examples/api-samples/views/sample15.haml +49 -43
- data/examples/api-samples/views/sample16.haml +49 -43
- data/examples/api-samples/views/sample17.haml +53 -47
- data/examples/api-samples/views/sample18.haml +140 -134
- data/examples/api-samples/views/sample19.haml +87 -81
- data/examples/api-samples/views/sample20.haml +53 -47
- data/examples/api-samples/views/sample21.haml +115 -111
- data/examples/api-samples/views/sample22.haml +94 -88
- data/examples/api-samples/views/sample23.haml +83 -78
- data/examples/api-samples/views/sample24.haml +54 -48
- data/examples/api-samples/views/sample25.haml +89 -83
- data/examples/api-samples/views/sample26.haml +62 -57
- data/examples/api-samples/views/sample27.haml +114 -109
- data/examples/api-samples/views/sample28.haml +55 -49
- data/examples/api-samples/views/sample29.haml +67 -69
- data/examples/api-samples/views/sample30.haml +54 -48
- data/examples/api-samples/views/sample31.haml +106 -100
- data/examples/api-samples/views/sample32.haml +90 -84
- data/examples/api-samples/views/sample33.haml +60 -54
- data/examples/api-samples/views/sample34.haml +51 -46
- data/examples/api-samples/views/sample35.haml +84 -78
- data/examples/api-samples/views/sample36.haml +63 -58
- data/examples/api-samples/views/sample37.haml +122 -116
- data/examples/api-samples/views/sample38.haml +104 -98
- data/examples/api-samples/views/sample39.haml +6 -2
- data/examples/api-samples/views/sample40.haml +94 -89
- data/examples/api-samples/views/sample41.haml +127 -123
- data/examples/api-samples/views/sample42.haml +60 -54
- data/examples/api-samples/views/sample43.haml +81 -77
- data/examples/api-samples/views/sample44.haml +85 -0
- data/examples/api-samples/views/sample45.haml +85 -0
- data/groupdocs.gemspec +2 -0
- data/lib/groupdocs/datasource/field.rb +9 -0
- data/lib/groupdocs/document.rb +66 -4
- data/lib/groupdocs/document/annotation.rb +11 -6
- data/lib/groupdocs/document/editor.rb +53 -0
- data/lib/groupdocs/document/field.rb +16 -0
- data/lib/groupdocs/document/style.rb +30 -0
- data/lib/groupdocs/job.rb +24 -0
- data/lib/groupdocs/questionnaire.rb +2 -0
- data/lib/groupdocs/questionnaire/collector.rb +52 -0
- data/lib/groupdocs/questionnaire/collector_style.rb +54 -0
- data/lib/groupdocs/questionnaire/question.rb +9 -0
- data/lib/groupdocs/questionnaire/style/base_font.rb +17 -0
- data/lib/groupdocs/questionnaire/style/question_title.rb +17 -0
- data/lib/groupdocs/questionnaire/style/title.rb +17 -0
- data/lib/groupdocs/signature/envelope.rb +43 -8
- data/lib/groupdocs/signature/form.rb +113 -12
- data/lib/groupdocs/signature/recipient.rb +38 -3
- data/lib/groupdocs/signature/shared/field_methods.rb +4 -2
- data/lib/groupdocs/signature/template.rb +20 -1
- data/lib/groupdocs/storage/file.rb +3 -2
- data/lib/groupdocs/user.rb +148 -0
- data/lib/groupdocs/version.rb +1 -1
- data/spec/groupdocs/api/helpers/access_rights_helper_spec.rb +5 -5
- data/spec/groupdocs/document/annotation_spec.rb +1 -1
- data/spec/groupdocs/signature/envelope_spec.rb +1 -1
- data/spec/groupdocs/user_spec.rb +4 -4
- data/spec/support/shared_examples/signature/shared/field_methods.rb +5 -4
- metadata +18 -3
@@ -31,9 +31,9 @@
|
|
31
31
|
|
32
32
|
</div>
|
33
33
|
|
34
|
-
<div class="content"><div class='highlight'><pre>get <span class="string">'/
|
35
|
-
haml <span class="symbol">:sample22</span>
|
36
|
-
<span class="keyword">end</span></pre></div></div>
|
34
|
+
<div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-22-how-to-create-or-update-user-and-add-him-to-collaborators'</span> <span class="hljs-keyword">do</span>
|
35
|
+
haml <span class="hljs-symbol">:sample22</span>
|
36
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
37
37
|
|
38
38
|
</li>
|
39
39
|
|
@@ -48,7 +48,7 @@
|
|
48
48
|
|
49
49
|
</div>
|
50
50
|
|
51
|
-
<div class="content"><div class='highlight'><pre>post <span class="string">'/
|
51
|
+
<div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-22-how-to-create-or-update-user-and-add-him-to-collaborators'</span> <span class="hljs-keyword">do</span></pre></div></div>
|
52
52
|
|
53
53
|
</li>
|
54
54
|
|
@@ -63,18 +63,18 @@
|
|
63
63
|
|
64
64
|
</div>
|
65
65
|
|
66
|
-
<div class="content"><div class='highlight'><pre> set <span class="symbol">:client_id</span>, params[<span class="symbol">:clientId</span>]
|
67
|
-
set <span class="symbol">:private_key</span>, params[<span class="symbol">:privateKey</span>]
|
68
|
-
set <span class="symbol">:fileId</span>, params[<span class="symbol">:fileId</span>]
|
69
|
-
set <span class="symbol">:email</span>, params[<span class="symbol">:email</span>]
|
70
|
-
set <span class="symbol">:first_name</span>, params[<span class="symbol">:firstName</span>]
|
71
|
-
set <span class="symbol">:last_name</span>, params[<span class="symbol">:lastName</span>]
|
72
|
-
set <span class="symbol">:base_path</span>, params[<span class="symbol">:basePath</span>]
|
73
|
-
set <span class="symbol">:url</span>, params[<span class="symbol">:url</span>]
|
74
|
-
set <span class="symbol">:source</span>, params[<span class="symbol">:source</span>]
|
66
|
+
<div class="content"><div class='highlight'><pre> set <span class="hljs-symbol">:client_id</span>, params[<span class="hljs-symbol">:clientId</span>]
|
67
|
+
set <span class="hljs-symbol">:private_key</span>, params[<span class="hljs-symbol">:privateKey</span>]
|
68
|
+
set <span class="hljs-symbol">:fileId</span>, params[<span class="hljs-symbol">:fileId</span>]
|
69
|
+
set <span class="hljs-symbol">:email</span>, params[<span class="hljs-symbol">:email</span>]
|
70
|
+
set <span class="hljs-symbol">:first_name</span>, params[<span class="hljs-symbol">:firstName</span>]
|
71
|
+
set <span class="hljs-symbol">:last_name</span>, params[<span class="hljs-symbol">:lastName</span>]
|
72
|
+
set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
|
73
|
+
set <span class="hljs-symbol">:url</span>, params[<span class="hljs-symbol">:url</span>]
|
74
|
+
set <span class="hljs-symbol">:source</span>, params[<span class="hljs-symbol">:source</span>]
|
75
75
|
|
76
76
|
|
77
|
-
<span class="keyword">begin</span></pre></div></div>
|
77
|
+
<span class="hljs-keyword">begin</span></pre></div></div>
|
78
78
|
|
79
79
|
</li>
|
80
80
|
|
@@ -89,7 +89,7 @@
|
|
89
89
|
|
90
90
|
</div>
|
91
91
|
|
92
|
-
<div class="content"><div class='highlight'><pre> raise <span class="string">'Please enter all required parameters'</span> <span class="keyword">if</span> settings.client_id.empty? <span class="keyword">or</span> settings.private_key.empty? <span class="keyword">or</span> settings.email.empty? <span class="keyword">or</span> settings.first_name.empty? <span class="keyword">or</span> settings.last_name.empty?</pre></div></div>
|
92
|
+
<div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'Please enter all required parameters'</span> <span class="hljs-keyword">if</span> settings.client_id.empty? <span class="hljs-keyword">or</span> settings.private_key.empty? <span class="hljs-keyword">or</span> settings.email.empty? <span class="hljs-keyword">or</span> settings.first_name.empty? <span class="hljs-keyword">or</span> settings.last_name.empty?</pre></div></div>
|
93
93
|
|
94
94
|
</li>
|
95
95
|
|
@@ -104,13 +104,13 @@
|
|
104
104
|
|
105
105
|
</div>
|
106
106
|
|
107
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
|
108
|
-
base_path = <span class="string">'https://api.groupdocs.com'</span>
|
109
|
-
<span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
|
110
|
-
base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
|
111
|
-
<span class="keyword">else</span>
|
107
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
|
108
|
+
base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
|
109
|
+
<span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
|
110
|
+
base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
|
111
|
+
<span class="hljs-keyword">else</span>
|
112
112
|
base_path = settings.base_path
|
113
|
-
<span class="keyword">end</span></pre></div></div>
|
113
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
114
114
|
|
115
115
|
</li>
|
116
116
|
|
@@ -125,7 +125,7 @@
|
|
125
125
|
|
126
126
|
</div>
|
127
127
|
|
128
|
-
<div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
|
128
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
|
129
129
|
groupdocs.client_id = settings.client_id
|
130
130
|
groupdocs.private_key = settings.private_key</pre></div></div>
|
131
131
|
|
@@ -142,9 +142,9 @@
|
|
142
142
|
|
143
143
|
</div>
|
144
144
|
|
145
|
-
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
|
146
|
-
<span class="keyword">end</span>
|
147
|
-
file = <span class="keyword">nil</span></pre></div></div>
|
145
|
+
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
|
146
|
+
<span class="hljs-keyword">end</span>
|
147
|
+
file = <span class="hljs-keyword">nil</span></pre></div></div>
|
148
148
|
|
149
149
|
</li>
|
150
150
|
|
@@ -159,8 +159,8 @@
|
|
159
159
|
|
160
160
|
</div>
|
161
161
|
|
162
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">case</span> settings.source
|
163
|
-
<span class="keyword">when</span> <span class="string">'guid'</span></pre></div></div>
|
162
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> settings.source
|
163
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'guid'</span></pre></div></div>
|
164
164
|
|
165
165
|
</li>
|
166
166
|
|
@@ -175,9 +175,9 @@
|
|
175
175
|
|
176
176
|
</div>
|
177
177
|
|
178
|
-
<div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.new({<span class="symbol">:guid</span> => settings.fileId})
|
179
|
-
<span class="keyword">when</span> <span class="string">'local'</span>
|
180
|
-
filepath = <span class="string">"<span class="subst">#{<span class="constant">Dir</span>.tmpdir}</span>/<span class="subst">#{params[<span class="symbol">:file</span>][<span class="symbol">:filename</span>]}</span>"</span></pre></div></div>
|
178
|
+
<div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.new({<span class="hljs-symbol">:guid</span> => settings.fileId})
|
179
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'local'</span>
|
180
|
+
filepath = <span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">Dir</span>.tmpdir}</span>/<span class="hljs-subst">#{params[<span class="hljs-symbol">:file</span>][<span class="hljs-symbol">:filename</span>]}</span>"</span></pre></div></div>
|
181
181
|
|
182
182
|
</li>
|
183
183
|
|
@@ -192,7 +192,7 @@
|
|
192
192
|
|
193
193
|
</div>
|
194
194
|
|
195
|
-
<div class="content"><div class='highlight'><pre> <span class="constant">File</span>.open(filepath, <span class="string">'wb'</span>) { |f| f.write(params[<span class="symbol">:file</span>][<span class="symbol">:tempfile</span>].read) }</pre></div></div>
|
195
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-constant">File</span>.open(filepath, <span class="hljs-string">'wb'</span>) { |f| f.write(params[<span class="hljs-symbol">:file</span>][<span class="hljs-symbol">:tempfile</span>].read) }</pre></div></div>
|
196
196
|
|
197
197
|
</li>
|
198
198
|
|
@@ -207,8 +207,8 @@
|
|
207
207
|
|
208
208
|
</div>
|
209
209
|
|
210
|
-
<div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload!(filepath, {})
|
211
|
-
<span class="keyword">when</span> <span class="string">'url'</span></pre></div></div>
|
210
|
+
<div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload!(filepath, {})
|
211
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'url'</span></pre></div></div>
|
212
212
|
|
213
213
|
</li>
|
214
214
|
|
@@ -223,10 +223,10 @@
|
|
223
223
|
|
224
224
|
</div>
|
225
225
|
|
226
|
-
<div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
|
227
|
-
<span class="keyword">else</span>
|
228
|
-
raise <span class="string">'Wrong GUID source.'</span>
|
229
|
-
<span class="keyword">end</span>
|
226
|
+
<div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
|
227
|
+
<span class="hljs-keyword">else</span>
|
228
|
+
raise <span class="hljs-string">'Wrong GUID source.'</span>
|
229
|
+
<span class="hljs-keyword">end</span>
|
230
230
|
|
231
231
|
|
232
232
|
file = file.to_document</pre></div></div>
|
@@ -244,14 +244,14 @@
|
|
244
244
|
|
245
245
|
</div>
|
246
246
|
|
247
|
-
<div class="content"><div class='highlight'><pre> user = <span class="constant">GroupDocs::User</span>.new
|
247
|
+
<div class="content"><div class='highlight'><pre> user = <span class="hljs-constant">GroupDocs::User</span>.new
|
248
248
|
|
249
249
|
user.primary_email = settings.email
|
250
250
|
user.nickname = settings.email
|
251
251
|
user.first_name = settings.first_name
|
252
252
|
user.last_name = settings.last_name
|
253
253
|
|
254
|
-
user.roles = [{<span class="symbol">:id</span> => <span class="string">'3'</span>, <span class="symbol">:name</span> => <span class="string">'User'</span>}]</pre></div></div>
|
254
|
+
user.roles = [{<span class="hljs-symbol">:id</span> => <span class="hljs-string">'3'</span>, <span class="hljs-symbol">:name</span> => <span class="hljs-string">'User'</span>}]</pre></div></div>
|
255
255
|
|
256
256
|
</li>
|
257
257
|
|
@@ -266,7 +266,7 @@
|
|
266
266
|
|
267
267
|
</div>
|
268
268
|
|
269
|
-
<div class="content"><div class='highlight'><pre> new_user = <span class="constant">GroupDocs::User</span>.update_account!(user)</pre></div></div>
|
269
|
+
<div class="content"><div class='highlight'><pre> new_user = <span class="hljs-constant">GroupDocs::User</span>.update_account!(user)</pre></div></div>
|
270
270
|
|
271
271
|
</li>
|
272
272
|
|
@@ -281,7 +281,7 @@
|
|
281
281
|
|
282
282
|
</div>
|
283
283
|
|
284
|
-
<div class="content"><div class='highlight'><pre> file.set_collaborators!([settings.email], <span class="number">2</span>)</pre></div></div>
|
284
|
+
<div class="content"><div class='highlight'><pre> file.set_collaborators!([settings.email], <span class="hljs-number">2</span>)</pre></div></div>
|
285
285
|
|
286
286
|
</li>
|
287
287
|
|
@@ -326,7 +326,7 @@
|
|
326
326
|
|
327
327
|
</div>
|
328
328
|
|
329
|
-
<div class="content"><div class='highlight'><pre> iframe = <span class="string">"/document-annotation2/embed/<span class="subst">#{file.file.guid}</span>?uid = <span class="subst">#{new_user.guid}</span>&download=true"</span></pre></div></div>
|
329
|
+
<div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/document-annotation2/embed/<span class="hljs-subst">#{file.file.guid}</span>?uid = <span class="hljs-subst">#{new_user.guid}</span>&download=true"</span></pre></div></div>
|
330
330
|
|
331
331
|
</li>
|
332
332
|
|
@@ -341,7 +341,7 @@
|
|
341
341
|
|
342
342
|
</div>
|
343
343
|
|
344
|
-
<div class="content"><div class='highlight'><pre> url = <span class="constant">GroupDocs::Api::Request</span>.new(<span class="symbol">:path</span> => iframe).prepare_and_sign_url</pre></div></div>
|
344
|
+
<div class="content"><div class='highlight'><pre> url = <span class="hljs-constant">GroupDocs::Api::Request</span>.new(<span class="hljs-symbol">:path</span> => iframe).prepare_and_sign_url</pre></div></div>
|
345
345
|
|
346
346
|
</li>
|
347
347
|
|
@@ -356,14 +356,14 @@
|
|
356
356
|
|
357
357
|
</div>
|
358
358
|
|
359
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">case</span> base_path
|
360
|
-
<span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
|
361
|
-
iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
|
362
|
-
<span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
|
363
|
-
iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
364
|
-
<span class="keyword">else</span>
|
365
|
-
iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
366
|
-
<span class="keyword">end</span></pre></div></div>
|
359
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> base_path
|
360
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'https://stage-api-groupdocs.dynabic.com'</span>
|
361
|
+
iframe = <span class="hljs-string">"https://stage-api-groupdocs.dynabic.com<span class="hljs-subst">#{url}</span>"</span>
|
362
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'https://dev-api-groupdocs.dynabic.com'</span>
|
363
|
+
iframe = <span class="hljs-string">"https://dev-apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
|
364
|
+
<span class="hljs-keyword">else</span>
|
365
|
+
iframe = <span class="hljs-string">"https://apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
|
366
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
367
367
|
|
368
368
|
</li>
|
369
369
|
|
@@ -378,11 +378,11 @@
|
|
378
378
|
|
379
379
|
</div>
|
380
380
|
|
381
|
-
<div class="content"><div class='highlight'><pre> iframe = <span class="string">"<iframe id='downloadframe' src='<span class="subst">#{iframe}</span>' width='800' height='1000'></iframe>"</span>
|
381
|
+
<div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"<iframe id='downloadframe' src='<span class="hljs-subst">#{iframe}</span>' width='800' height='1000'></iframe>"</span>
|
382
382
|
|
383
|
-
<span class="keyword">rescue</span> <span class="constant">Exception</span> => e
|
383
|
+
<span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> => e
|
384
384
|
err = e.message
|
385
|
-
<span class="keyword">end</span></pre></div></div>
|
385
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
386
386
|
|
387
387
|
</li>
|
388
388
|
|
@@ -397,8 +397,8 @@
|
|
397
397
|
|
398
398
|
</div>
|
399
399
|
|
400
|
-
<div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample22</span>, <span class="symbol">:locals</span> => {<span class="symbol">:userId</span> => settings.client_id, <span class="symbol">:privateKey</span> => settings.private_key, <span class="symbol">:fileId</span> => settings.fileId, <span class="symbol">:email</span> => settings.email, <span class="symbol">:firstName</span> => settings.first_name, <span class="symbol">:lastName</span> => settings.last_name, <span class="symbol">:iframe</span> => iframe, <span class="symbol">:err</span> => err}
|
401
|
-
<span class="keyword">end</span></pre></div></div>
|
400
|
+
<div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample22</span>, <span class="hljs-symbol">:locals</span> => {<span class="hljs-symbol">:userId</span> => settings.client_id, <span class="hljs-symbol">:privateKey</span> => settings.private_key, <span class="hljs-symbol">:fileId</span> => settings.fileId, <span class="hljs-symbol">:email</span> => settings.email, <span class="hljs-symbol">:firstName</span> => settings.first_name, <span class="hljs-symbol">:lastName</span> => settings.last_name, <span class="hljs-symbol">:iframe</span> => iframe, <span class="hljs-symbol">:err</span> => err}
|
401
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
402
402
|
|
403
403
|
</li>
|
404
404
|
|
@@ -31,9 +31,9 @@
|
|
31
31
|
|
32
32
|
</div>
|
33
33
|
|
34
|
-
<div class="content"><div class='highlight'><pre>get <span class="string">'/
|
35
|
-
haml <span class="symbol">:sample23</span>
|
36
|
-
<span class="keyword">end</span></pre></div></div>
|
34
|
+
<div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-23-how-to-view-document-pages-as-images'</span> <span class="hljs-keyword">do</span>
|
35
|
+
haml <span class="hljs-symbol">:sample23</span>
|
36
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
37
37
|
|
38
38
|
</li>
|
39
39
|
|
@@ -48,7 +48,7 @@
|
|
48
48
|
|
49
49
|
</div>
|
50
50
|
|
51
|
-
<div class="content"><div class='highlight'><pre>post <span class="string">'/
|
51
|
+
<div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-23-how-to-view-document-pages-as-images'</span> <span class="hljs-keyword">do</span></pre></div></div>
|
52
52
|
|
53
53
|
</li>
|
54
54
|
|
@@ -63,14 +63,14 @@
|
|
63
63
|
|
64
64
|
</div>
|
65
65
|
|
66
|
-
<div class="content"><div class='highlight'><pre> set <span class="symbol">:client_id</span>, params[<span class="symbol">:clientId</span>]
|
67
|
-
set <span class="symbol">:private_key</span>, params[<span class="symbol">:privateKey</span>]
|
68
|
-
set <span class="symbol">:source</span>, params[<span class="symbol">:source</span>]
|
69
|
-
set <span class="symbol">:file_id</span>, params[<span class="symbol">:fileId</span>]
|
70
|
-
set <span class="symbol">:url</span>, params[<span class="symbol">:url</span>]
|
71
|
-
set <span class="symbol">:base_path</span>, params[<span class="symbol">:basePath</span>]
|
66
|
+
<div class="content"><div class='highlight'><pre> set <span class="hljs-symbol">:client_id</span>, params[<span class="hljs-symbol">:clientId</span>]
|
67
|
+
set <span class="hljs-symbol">:private_key</span>, params[<span class="hljs-symbol">:privateKey</span>]
|
68
|
+
set <span class="hljs-symbol">:source</span>, params[<span class="hljs-symbol">:source</span>]
|
69
|
+
set <span class="hljs-symbol">:file_id</span>, params[<span class="hljs-symbol">:fileId</span>]
|
70
|
+
set <span class="hljs-symbol">:url</span>, params[<span class="hljs-symbol">:url</span>]
|
71
|
+
set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
|
72
72
|
|
73
|
-
<span class="keyword">begin</span></pre></div></div>
|
73
|
+
<span class="hljs-keyword">begin</span></pre></div></div>
|
74
74
|
|
75
75
|
</li>
|
76
76
|
|
@@ -85,7 +85,7 @@
|
|
85
85
|
|
86
86
|
</div>
|
87
87
|
|
88
|
-
<div class="content"><div class='highlight'><pre> raise <span class="string">'Please enter all required parameters'</span> <span class="keyword">if</span> settings.client_id.empty? <span class="keyword">or</span> settings.private_key.empty?</pre></div></div>
|
88
|
+
<div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'Please enter all required parameters'</span> <span class="hljs-keyword">if</span> settings.client_id.empty? <span class="hljs-keyword">or</span> settings.private_key.empty?</pre></div></div>
|
89
89
|
|
90
90
|
</li>
|
91
91
|
|
@@ -100,13 +100,13 @@
|
|
100
100
|
|
101
101
|
</div>
|
102
102
|
|
103
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
|
104
|
-
base_path = <span class="string">'https://api.groupdocs.com'</span>
|
105
|
-
<span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
|
106
|
-
base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
|
107
|
-
<span class="keyword">else</span>
|
103
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
|
104
|
+
base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
|
105
|
+
<span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
|
106
|
+
base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
|
107
|
+
<span class="hljs-keyword">else</span>
|
108
108
|
base_path = settings.base_path
|
109
|
-
<span class="keyword">end</span></pre></div></div>
|
109
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
110
110
|
|
111
111
|
</li>
|
112
112
|
|
@@ -121,7 +121,7 @@
|
|
121
121
|
|
122
122
|
</div>
|
123
123
|
|
124
|
-
<div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
|
124
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
|
125
125
|
groupdocs.client_id = settings.client_id
|
126
126
|
groupdocs.private_key = settings.private_key</pre></div></div>
|
127
127
|
|
@@ -138,8 +138,8 @@
|
|
138
138
|
|
139
139
|
</div>
|
140
140
|
|
141
|
-
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
|
142
|
-
<span class="keyword">end</span></pre></div></div>
|
141
|
+
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
|
142
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
143
143
|
|
144
144
|
</li>
|
145
145
|
|
@@ -154,8 +154,8 @@
|
|
154
154
|
|
155
155
|
</div>
|
156
156
|
|
157
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">case</span> settings.source
|
158
|
-
<span class="keyword">when</span> <span class="string">'guid'</span></pre></div></div>
|
157
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> settings.source
|
158
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'guid'</span></pre></div></div>
|
159
159
|
|
160
160
|
</li>
|
161
161
|
|
@@ -170,8 +170,8 @@
|
|
170
170
|
|
171
171
|
</div>
|
172
172
|
|
173
|
-
<div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.new({<span class="symbol">:guid</span> => settings.file_id})
|
174
|
-
<span class="keyword">when</span> <span class="string">'local'</span></pre></div></div>
|
173
|
+
<div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.new({<span class="hljs-symbol">:guid</span> => settings.file_id})
|
174
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'local'</span></pre></div></div>
|
175
175
|
|
176
176
|
</li>
|
177
177
|
|
@@ -186,7 +186,7 @@
|
|
186
186
|
|
187
187
|
</div>
|
188
188
|
|
189
|
-
<div class="content"><div class='highlight'><pre> file_path = <span class="string">"<span class="subst">#{<span class="constant">Dir</span>.tmpdir}</span>/<span class="subst">#{params[<span class="symbol">:file</span>][<span class="symbol">:filename</span>]}</span>"</span></pre></div></div>
|
189
|
+
<div class="content"><div class='highlight'><pre> file_path = <span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">Dir</span>.tmpdir}</span>/<span class="hljs-subst">#{params[<span class="hljs-symbol">:file</span>][<span class="hljs-symbol">:filename</span>]}</span>"</span></pre></div></div>
|
190
190
|
|
191
191
|
</li>
|
192
192
|
|
@@ -201,7 +201,7 @@
|
|
201
201
|
|
202
202
|
</div>
|
203
203
|
|
204
|
-
<div class="content"><div class='highlight'><pre> <span class="constant">File</span>.open(file_path, <span class="string">'wb'</span>) { |f| f.write(params[<span class="symbol">:file</span>][<span class="symbol">:tempfile</span>].read) }</pre></div></div>
|
204
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-constant">File</span>.open(file_path, <span class="hljs-string">'wb'</span>) { |f| f.write(params[<span class="hljs-symbol">:file</span>][<span class="hljs-symbol">:tempfile</span>].read) }</pre></div></div>
|
205
205
|
|
206
206
|
</li>
|
207
207
|
|
@@ -216,8 +216,8 @@
|
|
216
216
|
|
217
217
|
</div>
|
218
218
|
|
219
|
-
<div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload!(file_path, {})
|
220
|
-
<span class="keyword">when</span> <span class="string">'url'</span></pre></div></div>
|
219
|
+
<div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload!(file_path, {})
|
220
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'url'</span></pre></div></div>
|
221
221
|
|
222
222
|
</li>
|
223
223
|
|
@@ -232,10 +232,10 @@
|
|
232
232
|
|
233
233
|
</div>
|
234
234
|
|
235
|
-
<div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
|
236
|
-
<span class="keyword">else</span>
|
237
|
-
raise <span class="string">'Wrong GUID source.'</span>
|
238
|
-
<span class="keyword">end</span></pre></div></div>
|
235
|
+
<div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
|
236
|
+
<span class="hljs-keyword">else</span>
|
237
|
+
raise <span class="hljs-string">'Wrong GUID source.'</span>
|
238
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
239
239
|
|
240
240
|
</li>
|
241
241
|
|
@@ -250,7 +250,7 @@
|
|
250
250
|
|
251
251
|
</div>
|
252
252
|
|
253
|
-
<div class="content"><div class='highlight'><pre> raise <span class="string">'No such file'</span> <span class="keyword">unless</span> file.is_a?(<span class="constant">GroupDocs::Storage::File</span>)</pre></div></div>
|
253
|
+
<div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'No such file'</span> <span class="hljs-keyword">unless</span> file.is_a?(<span class="hljs-constant">GroupDocs::Storage::File</span>)</pre></div></div>
|
254
254
|
|
255
255
|
</li>
|
256
256
|
|
@@ -280,11 +280,11 @@
|
|
280
280
|
|
281
281
|
</div>
|
282
282
|
|
283
|
-
<div class="content"><div class='highlight'><pre> page_image = document.page_images!(<span class="number">700</span>, <span class="number">700</span>, {})
|
283
|
+
<div class="content"><div class='highlight'><pre> page_image = document.page_images!(<span class="hljs-number">700</span>, <span class="hljs-number">700</span>, {})
|
284
284
|
|
285
|
-
<span class="keyword">rescue</span> <span class="constant">Exception</span> => e
|
285
|
+
<span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> => e
|
286
286
|
err = e.message
|
287
|
-
<span class="keyword">end</span></pre></div></div>
|
287
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
288
288
|
|
289
289
|
</li>
|
290
290
|
|
@@ -299,8 +299,8 @@
|
|
299
299
|
|
300
300
|
</div>
|
301
301
|
|
302
|
-
<div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample23</span>, <span class="symbol">:locals</span> => {<span class="symbol">:userId</span> => settings.client_id, <span class="symbol">:privateKey</span> => settings.private_key, <span class="symbol">:page_image</span> => page_image, <span class="symbol">:err</span> => err}
|
303
|
-
<span class="keyword">end</span></pre></div></div>
|
302
|
+
<div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample23</span>, <span class="hljs-symbol">:locals</span> => {<span class="hljs-symbol">:userId</span> => settings.client_id, <span class="hljs-symbol">:privateKey</span> => settings.private_key, <span class="hljs-symbol">:page_image</span> => page_image, <span class="hljs-symbol">:err</span> => err}
|
303
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
304
304
|
|
305
305
|
</li>
|
306
306
|
|
@@ -31,9 +31,9 @@
|
|
31
31
|
|
32
32
|
</div>
|
33
33
|
|
34
|
-
<div class="content"><div class='highlight'><pre>get <span class="string">'/
|
35
|
-
haml <span class="symbol">:sample24</span>
|
36
|
-
<span class="keyword">end</span></pre></div></div>
|
34
|
+
<div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-24-how-to-use-storageapi-to-upload-fil-from-url-to-groupdocs-account'</span> <span class="hljs-keyword">do</span>
|
35
|
+
haml <span class="hljs-symbol">:sample24</span>
|
36
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
37
37
|
|
38
38
|
</li>
|
39
39
|
|
@@ -48,7 +48,7 @@
|
|
48
48
|
|
49
49
|
</div>
|
50
50
|
|
51
|
-
<div class="content"><div class='highlight'><pre>post <span class="string">'/
|
51
|
+
<div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-24-how-to-use-storageapi-to-upload-fil-from-url-to-groupdocs-account'</span> <span class="hljs-keyword">do</span></pre></div></div>
|
52
52
|
|
53
53
|
</li>
|
54
54
|
|
@@ -63,12 +63,12 @@
|
|
63
63
|
|
64
64
|
</div>
|
65
65
|
|
66
|
-
<div class="content"><div class='highlight'><pre> set <span class="symbol">:client_id</span>, params[<span class="symbol">:clientId</span>]
|
67
|
-
set <span class="symbol">:private_key</span>, params[<span class="symbol">:privateKey</span>]
|
68
|
-
set <span class="symbol">:url</span>, params[<span class="symbol">:url</span>]
|
69
|
-
set <span class="symbol">:base_path</span>, params[<span class="symbol">:basePath</span>]
|
66
|
+
<div class="content"><div class='highlight'><pre> set <span class="hljs-symbol">:client_id</span>, params[<span class="hljs-symbol">:clientId</span>]
|
67
|
+
set <span class="hljs-symbol">:private_key</span>, params[<span class="hljs-symbol">:privateKey</span>]
|
68
|
+
set <span class="hljs-symbol">:url</span>, params[<span class="hljs-symbol">:url</span>]
|
69
|
+
set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
|
70
70
|
|
71
|
-
<span class="keyword">begin</span></pre></div></div>
|
71
|
+
<span class="hljs-keyword">begin</span></pre></div></div>
|
72
72
|
|
73
73
|
</li>
|
74
74
|
|
@@ -83,7 +83,7 @@
|
|
83
83
|
|
84
84
|
</div>
|
85
85
|
|
86
|
-
<div class="content"><div class='highlight'><pre> raise <span class="string">'Please enter all required parameters'</span> <span class="keyword">if</span> settings.client_id.empty? <span class="keyword">or</span> settings.private_key.empty? <span class="keyword">or</span> settings.url.<span class="keyword">nil</span>?</pre></div></div>
|
86
|
+
<div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'Please enter all required parameters'</span> <span class="hljs-keyword">if</span> settings.client_id.empty? <span class="hljs-keyword">or</span> settings.private_key.empty? <span class="hljs-keyword">or</span> settings.url.<span class="hljs-keyword">nil</span>?</pre></div></div>
|
87
87
|
|
88
88
|
</li>
|
89
89
|
|
@@ -98,13 +98,13 @@
|
|
98
98
|
|
99
99
|
</div>
|
100
100
|
|
101
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
|
102
|
-
base_path = <span class="string">'https://api.groupdocs.com'</span>
|
103
|
-
<span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
|
104
|
-
base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
|
105
|
-
<span class="keyword">else</span>
|
101
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
|
102
|
+
base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
|
103
|
+
<span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
|
104
|
+
base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
|
105
|
+
<span class="hljs-keyword">else</span>
|
106
106
|
base_path = settings.base_path
|
107
|
-
<span class="keyword">end</span></pre></div></div>
|
107
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
108
108
|
|
109
109
|
</li>
|
110
110
|
|
@@ -119,7 +119,7 @@
|
|
119
119
|
|
120
120
|
</div>
|
121
121
|
|
122
|
-
<div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
|
122
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
|
123
123
|
groupdocs.client_id = settings.client_id
|
124
124
|
groupdocs.private_key = settings.private_key</pre></div></div>
|
125
125
|
|
@@ -136,8 +136,8 @@
|
|
136
136
|
|
137
137
|
</div>
|
138
138
|
|
139
|
-
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
|
140
|
-
<span class="keyword">end</span></pre></div></div>
|
139
|
+
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
|
140
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
141
141
|
|
142
142
|
</li>
|
143
143
|
|
@@ -152,7 +152,7 @@
|
|
152
152
|
|
153
153
|
</div>
|
154
154
|
|
155
|
-
<div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload_web!(settings.url, {<span class="symbol">:client_id</span> => settings.client_id, <span class="symbol">:private_key</span> => settings.private_key})</pre></div></div>
|
155
|
+
<div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload_web!(settings.url, {<span class="hljs-symbol">:client_id</span> => settings.client_id, <span class="hljs-symbol">:private_key</span> => settings.private_key})</pre></div></div>
|
156
156
|
|
157
157
|
</li>
|
158
158
|
|
@@ -167,7 +167,7 @@
|
|
167
167
|
|
168
168
|
</div>
|
169
169
|
|
170
|
-
<div class="content"><div class='highlight'><pre> message = <span class="string">"<p>File was uploaded to GroupDocs. Here you can see your <strong> file in the GroupDocs Embedded Viewer.</p>"</span></pre></div></div>
|
170
|
+
<div class="content"><div class='highlight'><pre> message = <span class="hljs-string">"<p>File was uploaded to GroupDocs. Here you can see your <strong> file in the GroupDocs Embedded Viewer.</p>"</span></pre></div></div>
|
171
171
|
|
172
172
|
</li>
|
173
173
|
|
@@ -182,7 +182,7 @@
|
|
182
182
|
|
183
183
|
</div>
|
184
184
|
|
185
|
-
<div class="content"><div class='highlight'><pre> iframe = <span class="string">"/document-viewer/embed/<span class="subst">#{file.guid}</span>"</span></pre></div></div>
|
185
|
+
<div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/document-viewer/embed/<span class="hljs-subst">#{file.guid}</span>"</span></pre></div></div>
|
186
186
|
|
187
187
|
</li>
|
188
188
|
|
@@ -197,7 +197,7 @@
|
|
197
197
|
|
198
198
|
</div>
|
199
199
|
|
200
|
-
<div class="content"><div class='highlight'><pre> url = <span class="constant">GroupDocs::Api::Request</span>.new(<span class="symbol">:path</span> => iframe).prepare_and_sign_url</pre></div></div>
|
200
|
+
<div class="content"><div class='highlight'><pre> url = <span class="hljs-constant">GroupDocs::Api::Request</span>.new(<span class="hljs-symbol">:path</span> => iframe).prepare_and_sign_url</pre></div></div>
|
201
201
|
|
202
202
|
</li>
|
203
203
|
|
@@ -212,14 +212,14 @@
|
|
212
212
|
|
213
213
|
</div>
|
214
214
|
|
215
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">case</span> base_path
|
216
|
-
<span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
|
217
|
-
iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
|
218
|
-
<span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
|
219
|
-
iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
220
|
-
<span class="keyword">else</span>
|
221
|
-
iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
222
|
-
<span class="keyword">end</span></pre></div></div>
|
215
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> base_path
|
216
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'https://stage-api-groupdocs.dynabic.com'</span>
|
217
|
+
iframe = <span class="hljs-string">"https://stage-api-groupdocs.dynabic.com<span class="hljs-subst">#{url}</span>"</span>
|
218
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'https://dev-api-groupdocs.dynabic.com'</span>
|
219
|
+
iframe = <span class="hljs-string">"https://dev-apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
|
220
|
+
<span class="hljs-keyword">else</span>
|
221
|
+
iframe = <span class="hljs-string">"https://apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
|
222
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
223
223
|
|
224
224
|
</li>
|
225
225
|
|
@@ -234,11 +234,11 @@
|
|
234
234
|
|
235
235
|
</div>
|
236
236
|
|
237
|
-
<div class="content"><div class='highlight'><pre> iframe = <span class="string">"<iframe id='downloadframe' src='<span class="subst">#{iframe}</span>' width='800' height='1000'></iframe>"</span>
|
237
|
+
<div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"<iframe id='downloadframe' src='<span class="hljs-subst">#{iframe}</span>' width='800' height='1000'></iframe>"</span>
|
238
238
|
|
239
|
-
<span class="keyword">rescue</span> <span class="constant">Exception</span> => e
|
239
|
+
<span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> => e
|
240
240
|
err = e.message
|
241
|
-
<span class="keyword">end</span></pre></div></div>
|
241
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
242
242
|
|
243
243
|
</li>
|
244
244
|
|
@@ -253,8 +253,8 @@
|
|
253
253
|
|
254
254
|
</div>
|
255
255
|
|
256
|
-
<div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample24</span>, <span class="symbol">:locals</span> => {<span class="symbol">:userId</span> => settings.client_id, <span class="symbol">:privateKey</span> => settings.private_key, <span class="symbol">:iframe</span> => iframe, <span class="symbol">:message</span> => message, <span class="symbol">:err</span> => err}
|
257
|
-
<span class="keyword">end</span></pre></div></div>
|
256
|
+
<div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample24</span>, <span class="hljs-symbol">:locals</span> => {<span class="hljs-symbol">:userId</span> => settings.client_id, <span class="hljs-symbol">:privateKey</span> => settings.private_key, <span class="hljs-symbol">:iframe</span> => iframe, <span class="hljs-symbol">:message</span> => message, <span class="hljs-symbol">:err</span> => err}
|
257
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
258
258
|
|
259
259
|
</li>
|
260
260
|
|