groupdocs 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,37 @@
|
|
1
|
+
## v1.7.0
|
2
|
+
|
3
|
+
**Changes**
|
4
|
+
|
5
|
+
* `Document::Annotation` updated types of annotation
|
6
|
+
* `Document#templates!` added parameter<Hash> "settings"
|
7
|
+
* `Signature::Envelope#sign!` added parameter<Hash> "settings"
|
8
|
+
* `Signature::Form#sign!` added parameter<Hash> settings and parameter<String> "filepath"
|
9
|
+
* `Signature::Form#fields!` delete parameter "documentGuid"
|
10
|
+
|
11
|
+
**New**
|
12
|
+
|
13
|
+
* Added `Document#editor_fields!`
|
14
|
+
* Added `Document#questionnaire_template!`
|
15
|
+
* Added `Job.get_conversions!`
|
16
|
+
* Added new attributes `User`
|
17
|
+
* Added new attributes `DataSource::Field`
|
18
|
+
* Added new attributes `Document::Annotation`
|
19
|
+
* Added `Document::TemplateEditorFields`
|
20
|
+
* Added new attributes `Document::Field`
|
21
|
+
* Added `Document::TemplateEditorFieldStyle`
|
22
|
+
* Added `Questionnaire::Collector#decorate!`
|
23
|
+
* Added `Questionnaire::Collector#get_decorate!`
|
24
|
+
* Added `Questionnaire::QuestionnaireCollectorStyle`
|
25
|
+
* Added new attributes `Questionnaire::Question`
|
26
|
+
* Added new attributes `Signature::Envelope`
|
27
|
+
* Added `Signature::Form#update_partipicant!`
|
28
|
+
* Added `Signature::Form#validate_partipicant!`
|
29
|
+
* Added `Signature::Form#document_fields!`
|
30
|
+
* Added `Signature::Form#get_logs!`
|
31
|
+
* Added new attributes `Signature::Recipient`
|
32
|
+
* Added new attributes `Signature::Template`
|
33
|
+
|
34
|
+
|
1
35
|
## v1.6.0
|
2
36
|
|
3
37
|
**Changes**
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (C) 2001-2014 Aspose Pty Ltd
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -85,6 +85,9 @@ GroupDocs::Storage::Folder.new do |folder|
|
|
85
85
|
end
|
86
86
|
#=> #<GroupDocs::Storage::Folder:0x0000000171f432 @name="Folder">
|
87
87
|
```
|
88
|
+
## License
|
89
|
+
|
90
|
+
GroupDocs Ruby SDK is released under the [MIT License](https://github.com/groupdocs/groupdocs-ruby/blob/master/LICENSE.txt).
|
88
91
|
|
89
92
|
### Copyright
|
90
93
|
|
@@ -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">:sample01</span>
|
36
|
-
<span class="keyword">end</span></pre></div></div>
|
34
|
+
<div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-1-how-to-login-to-groupdocs-using-the-api'</span> <span class="hljs-keyword">do</span>
|
35
|
+
haml <span class="hljs-symbol">:sample01</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-1-how-to-login-to-groupdocs-using-the-api'</span> <span class="hljs-keyword">do</span></pre></div></div>
|
52
52
|
|
53
53
|
</li>
|
54
54
|
|
@@ -63,11 +63,11 @@
|
|
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">: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">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
|
69
69
|
|
70
|
-
<span class="keyword">begin</span></pre></div></div>
|
70
|
+
<span class="hljs-keyword">begin</span></pre></div></div>
|
71
71
|
|
72
72
|
</li>
|
73
73
|
|
@@ -82,13 +82,13 @@
|
|
82
82
|
|
83
83
|
</div>
|
84
84
|
|
85
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
|
86
|
-
base_path = <span class="string">'https://api.groupdocs.com'</span>
|
87
|
-
<span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
|
88
|
-
base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
|
89
|
-
<span class="keyword">else</span>
|
85
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
|
86
|
+
base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
|
87
|
+
<span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
|
88
|
+
base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
|
89
|
+
<span class="hljs-keyword">else</span>
|
90
90
|
base_path = settings.base_path
|
91
|
-
<span class="keyword">end</span></pre></div></div>
|
91
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
92
92
|
|
93
93
|
</li>
|
94
94
|
|
@@ -103,7 +103,7 @@
|
|
103
103
|
|
104
104
|
</div>
|
105
105
|
|
106
|
-
<div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
|
106
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
|
107
107
|
groupdocs.client_id = settings.client_id
|
108
108
|
groupdocs.private_key = settings.private_key</pre></div></div>
|
109
109
|
|
@@ -120,8 +120,8 @@
|
|
120
120
|
|
121
121
|
</div>
|
122
122
|
|
123
|
-
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
|
124
|
-
<span class="keyword">end</span></pre></div></div>
|
123
|
+
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
|
124
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
125
125
|
|
126
126
|
</li>
|
127
127
|
|
@@ -136,7 +136,7 @@
|
|
136
136
|
|
137
137
|
</div>
|
138
138
|
|
139
|
-
<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>
|
139
|
+
<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>
|
140
140
|
|
141
141
|
</li>
|
142
142
|
|
@@ -151,11 +151,11 @@
|
|
151
151
|
|
152
152
|
</div>
|
153
153
|
|
154
|
-
<div class="content"><div class='highlight'><pre> user = <span class="constant">GroupDocs::User</span>.get!()
|
154
|
+
<div class="content"><div class='highlight'><pre> user = <span class="hljs-constant">GroupDocs::User</span>.get!()
|
155
155
|
|
156
|
-
<span class="keyword">rescue</span> <span class="constant">Exception</span> => e
|
156
|
+
<span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> => e
|
157
157
|
err = e.message
|
158
|
-
<span class="keyword">end</span></pre></div></div>
|
158
|
+
<span class="hljs-keyword">end</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> haml <span class="symbol">:sample01</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">:user</span> => user, <span class="symbol">:err</span> => err}
|
174
|
-
<span class="keyword">end</span></pre></div></div>
|
173
|
+
<div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample01</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">:user</span> => user, <span class="hljs-symbol">:err</span> => err}
|
174
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
175
175
|
|
176
176
|
</li>
|
177
177
|
|
@@ -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">:sample02</span>
|
36
|
-
<span class="keyword">end</span></pre></div></div>
|
34
|
+
<div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-2-how-to-list-files-within-groupdocs-storage-using-the-storage-api'</span> <span class="hljs-keyword">do</span>
|
35
|
+
haml <span class="hljs-symbol">:sample02</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-2-how-to-list-files-within-groupdocs-storage-using-the-storage-api'</span> <span class="hljs-keyword">do</span></pre></div></div>
|
52
52
|
|
53
53
|
</li>
|
54
54
|
|
@@ -63,11 +63,11 @@
|
|
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">: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">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
|
69
69
|
|
70
|
-
<span class="keyword">begin</span></pre></div></div>
|
70
|
+
<span class="hljs-keyword">begin</span></pre></div></div>
|
71
71
|
|
72
72
|
</li>
|
73
73
|
|
@@ -82,13 +82,13 @@
|
|
82
82
|
|
83
83
|
</div>
|
84
84
|
|
85
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
|
86
|
-
base_path = <span class="string">'https://api.groupdocs.com'</span>
|
87
|
-
<span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
|
88
|
-
base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
|
89
|
-
<span class="keyword">else</span>
|
85
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
|
86
|
+
base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
|
87
|
+
<span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
|
88
|
+
base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
|
89
|
+
<span class="hljs-keyword">else</span>
|
90
90
|
base_path = settings.base_path
|
91
|
-
<span class="keyword">end</span></pre></div></div>
|
91
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
92
92
|
|
93
93
|
</li>
|
94
94
|
|
@@ -103,7 +103,7 @@
|
|
103
103
|
|
104
104
|
</div>
|
105
105
|
|
106
|
-
<div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
|
106
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
|
107
107
|
groupdocs.client_id = settings.client_id
|
108
108
|
groupdocs.private_key = settings.private_key</pre></div></div>
|
109
109
|
|
@@ -120,8 +120,8 @@
|
|
120
120
|
|
121
121
|
</div>
|
122
122
|
|
123
|
-
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
|
124
|
-
<span class="keyword">end</span></pre></div></div>
|
123
|
+
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
|
124
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
125
125
|
|
126
126
|
</li>
|
127
127
|
|
@@ -136,7 +136,7 @@
|
|
136
136
|
|
137
137
|
</div>
|
138
138
|
|
139
|
-
<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>
|
139
|
+
<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>
|
140
140
|
|
141
141
|
</li>
|
142
142
|
|
@@ -151,7 +151,7 @@
|
|
151
151
|
|
152
152
|
</div>
|
153
153
|
|
154
|
-
<div class="content"><div class='highlight'><pre> files_list = <span class="constant">GroupDocs::Storage::Folder</span>.list!(<span class="string">'/'</span>, {})</pre></div></div>
|
154
|
+
<div class="content"><div class='highlight'><pre> files_list = <span class="hljs-constant">GroupDocs::Storage::Folder</span>.list!(<span class="hljs-string">'/'</span>, {})</pre></div></div>
|
155
155
|
|
156
156
|
</li>
|
157
157
|
|
@@ -166,14 +166,14 @@
|
|
166
166
|
|
167
167
|
</div>
|
168
168
|
|
169
|
-
<div class="content"><div class='highlight'><pre> filelist = <span class="string">''</span>
|
170
|
-
files_list.each <span class="keyword">do</span> |element|
|
171
|
-
<span class="keyword">if</span> element.<span class="keyword">class</span>.name.split(<span class="string">'::'</span>).last == <span class="string">'File'</span> <span class="keyword">then</span> filelist << <span class="string">"<span class="subst">#{element.name}</span><br />"</span> <span class="keyword">end</span>
|
172
|
-
<span class="keyword">end</span>
|
169
|
+
<div class="content"><div class='highlight'><pre> filelist = <span class="hljs-string">''</span>
|
170
|
+
files_list.each <span class="hljs-keyword">do</span> |element|
|
171
|
+
<span class="hljs-keyword">if</span> element.<span class="hljs-keyword">class</span>.name.split(<span class="hljs-string">'::'</span>).last == <span class="hljs-string">'File'</span> <span class="hljs-keyword">then</span> filelist << <span class="hljs-string">"<span class="hljs-subst">#{element.name}</span><br />"</span> <span class="hljs-keyword">end</span>
|
172
|
+
<span class="hljs-keyword">end</span>
|
173
173
|
|
174
|
-
<span class="keyword">rescue</span> <span class="constant">Exception</span> => e
|
174
|
+
<span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> => e
|
175
175
|
err = e.message
|
176
|
-
<span class="keyword">end</span></pre></div></div>
|
176
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
177
177
|
|
178
178
|
</li>
|
179
179
|
|
@@ -188,8 +188,8 @@
|
|
188
188
|
|
189
189
|
</div>
|
190
190
|
|
191
|
-
<div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample02</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">:filelist</span> => filelist, <span class="symbol">:err</span> => err}
|
192
|
-
<span class="keyword">end</span></pre></div></div>
|
191
|
+
<div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample02</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">:filelist</span> => filelist, <span class="hljs-symbol">:err</span> => err}
|
192
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
193
193
|
|
194
194
|
</li>
|
195
195
|
|
@@ -31,12 +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">:sample03</span>
|
36
|
-
<span class="keyword">end</span>
|
37
|
-
|
38
|
-
<span class="constant">POST</span> request
|
39
|
-
post <span class="string">'/sample03'</span> <span class="keyword">do</span></pre></div></div>
|
34
|
+
<div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-3-how-to-upload-a-file-to-groupdocs-using-the-storage-api'</span> <span class="hljs-keyword">do</span>
|
35
|
+
haml <span class="hljs-symbol">:sample03</span>
|
36
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
40
37
|
|
41
38
|
</li>
|
42
39
|
|
@@ -47,19 +44,11 @@ post <span class="string">'/sample03'</span> <span class="keyword">do</span></pr
|
|
47
44
|
<div class="pilwrap ">
|
48
45
|
<a class="pilcrow" href="#section-2">¶</a>
|
49
46
|
</div>
|
50
|
-
<p>
|
47
|
+
<p>POST request</p>
|
51
48
|
|
52
49
|
</div>
|
53
50
|
|
54
|
-
<div class="content"><div class='highlight'><pre>
|
55
|
-
set <span class="symbol">:private_key</span>, params[<span class="symbol">:privateKey</span>]
|
56
|
-
set <span class="symbol">:source</span>, params[<span class="symbol">:source</span>]
|
57
|
-
set <span class="symbol">:url</span>, params[<span class="symbol">:url</span>]
|
58
|
-
set <span class="symbol">:folder_path</span>, params[<span class="symbol">:folderPath</span>]
|
59
|
-
set <span class="symbol">:callback</span>, params[<span class="symbol">:callback</span>]
|
60
|
-
set <span class="symbol">:base_path</span>, params[<span class="symbol">:basePath</span>]
|
61
|
-
|
62
|
-
<span class="keyword">begin</span></pre></div></div>
|
51
|
+
<div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-3-how-to-upload-a-file-to-groupdocs-using-the-storage-api'</span> <span class="hljs-keyword">do</span></pre></div></div>
|
63
52
|
|
64
53
|
</li>
|
65
54
|
|
@@ -70,11 +59,19 @@ post <span class="string">'/sample03'</span> <span class="keyword">do</span></pr
|
|
70
59
|
<div class="pilwrap ">
|
71
60
|
<a class="pilcrow" href="#section-3">¶</a>
|
72
61
|
</div>
|
73
|
-
<p>
|
62
|
+
<p>Set variables</p>
|
74
63
|
|
75
64
|
</div>
|
76
65
|
|
77
|
-
<div class="content"><div class='highlight'><pre>
|
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">:url</span>, params[<span class="hljs-symbol">:url</span>]
|
70
|
+
set <span class="hljs-symbol">:folder_path</span>, params[<span class="hljs-symbol">:folderPath</span>]
|
71
|
+
set <span class="hljs-symbol">:callback</span>, params[<span class="hljs-symbol">:callback</span>]
|
72
|
+
set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
|
73
|
+
|
74
|
+
<span class="hljs-keyword">begin</span></pre></div></div>
|
78
75
|
|
79
76
|
</li>
|
80
77
|
|
@@ -85,17 +82,11 @@ post <span class="string">'/sample03'</span> <span class="keyword">do</span></pr
|
|
85
82
|
<div class="pilwrap ">
|
86
83
|
<a class="pilcrow" href="#section-4">¶</a>
|
87
84
|
</div>
|
88
|
-
<p>
|
85
|
+
<p>Check required variables</p>
|
89
86
|
|
90
87
|
</div>
|
91
88
|
|
92
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.
|
93
|
-
base_path = <span class="string">'https://api.groupdocs.com'</span>
|
94
|
-
<span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
|
95
|
-
base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
|
96
|
-
<span class="keyword">else</span>
|
97
|
-
base_path = settings.base_path
|
98
|
-
<span class="keyword">end</span></pre></div></div>
|
89
|
+
<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>
|
99
90
|
|
100
91
|
</li>
|
101
92
|
|
@@ -106,13 +97,17 @@ post <span class="string">'/sample03'</span> <span class="keyword">do</span></pr
|
|
106
97
|
<div class="pilwrap ">
|
107
98
|
<a class="pilcrow" href="#section-5">¶</a>
|
108
99
|
</div>
|
109
|
-
<p>
|
100
|
+
<p>Prepare base path</p>
|
110
101
|
|
111
102
|
</div>
|
112
103
|
|
113
|
-
<div class="content"><div class='highlight'><pre> <span class="
|
114
|
-
|
115
|
-
|
104
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
|
105
|
+
base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
|
106
|
+
<span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
|
107
|
+
base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
|
108
|
+
<span class="hljs-keyword">else</span>
|
109
|
+
base_path = settings.base_path
|
110
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
116
111
|
|
117
112
|
</li>
|
118
113
|
|
@@ -123,12 +118,13 @@ post <span class="string">'/sample03'</span> <span class="keyword">do</span></pr
|
|
123
118
|
<div class="pilwrap ">
|
124
119
|
<a class="pilcrow" href="#section-6">¶</a>
|
125
120
|
</div>
|
126
|
-
<p>
|
121
|
+
<p>Configure your access to API server</p>
|
127
122
|
|
128
123
|
</div>
|
129
124
|
|
130
|
-
<div class="content"><div class='highlight'><pre>
|
131
|
-
|
125
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
|
126
|
+
groupdocs.client_id = settings.client_id
|
127
|
+
groupdocs.private_key = settings.private_key</pre></div></div>
|
132
128
|
|
133
129
|
</li>
|
134
130
|
|
@@ -139,13 +135,12 @@ post <span class="string">'/sample03'</span> <span class="keyword">do</span></pr
|
|
139
135
|
<div class="pilwrap ">
|
140
136
|
<a class="pilcrow" href="#section-7">¶</a>
|
141
137
|
</div>
|
142
|
-
<p>
|
138
|
+
<p>Optionally specify API server and version</p>
|
143
139
|
|
144
140
|
</div>
|
145
141
|
|
146
|
-
<div class="content"><div class='highlight'><pre>
|
147
|
-
|
148
|
-
<span class="keyword">when</span> <span class="string">'file'</span></pre></div></div>
|
142
|
+
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
|
143
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
149
144
|
|
150
145
|
</li>
|
151
146
|
|
@@ -156,11 +151,13 @@ post <span class="string">'/sample03'</span> <span class="keyword">do</span></pr
|
|
156
151
|
<div class="pilwrap ">
|
157
152
|
<a class="pilcrow" href="#section-8">¶</a>
|
158
153
|
</div>
|
159
|
-
<p>
|
154
|
+
<p>Get document by file GUID</p>
|
160
155
|
|
161
156
|
</div>
|
162
157
|
|
163
|
-
<div class="content"><div class='highlight'><pre>
|
158
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> settings.source
|
159
|
+
|
160
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'file'</span></pre></div></div>
|
164
161
|
|
165
162
|
</li>
|
166
163
|
|
@@ -171,11 +168,11 @@ post <span class="string">'/sample03'</span> <span class="keyword">do</span></pr
|
|
171
168
|
<div class="pilwrap ">
|
172
169
|
<a class="pilcrow" href="#section-9">¶</a>
|
173
170
|
</div>
|
174
|
-
<p>
|
171
|
+
<p>Construct path</p>
|
175
172
|
|
176
173
|
</div>
|
177
174
|
|
178
|
-
<div class="content"><div class='highlight'><pre> <span class="
|
175
|
+
<div class="content"><div class='highlight'><pre> 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>
|
179
176
|
|
180
177
|
</li>
|
181
178
|
|
@@ -186,13 +183,11 @@ post <span class="string">'/sample03'</span> <span class="keyword">do</span></pr
|
|
186
183
|
<div class="pilwrap ">
|
187
184
|
<a class="pilcrow" href="#section-10">¶</a>
|
188
185
|
</div>
|
189
|
-
<p>
|
186
|
+
<p>Open file</p>
|
190
187
|
|
191
188
|
</div>
|
192
189
|
|
193
|
-
<div class="content"><div class='highlight'><pre>
|
194
|
-
|
195
|
-
<span class="keyword">when</span> <span class="string">'url'</span></pre></div></div>
|
190
|
+
<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
191
|
|
197
192
|
</li>
|
198
193
|
|
@@ -203,13 +198,13 @@ post <span class="string">'/sample03'</span> <span class="keyword">do</span></pr
|
|
203
198
|
<div class="pilwrap ">
|
204
199
|
<a class="pilcrow" href="#section-11">¶</a>
|
205
200
|
</div>
|
206
|
-
<p>
|
201
|
+
<p>Make a request to API using client_id and private_key</p>
|
207
202
|
|
208
203
|
</div>
|
209
204
|
|
210
|
-
<div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.
|
211
|
-
|
212
|
-
<span class="keyword">
|
205
|
+
<div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload!(filepath, {<span class="hljs-symbol">path:</span> settings.folder_path, <span class="hljs-symbol">callbackUrl:</span> settings.callback})
|
206
|
+
|
207
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'url'</span></pre></div></div>
|
213
208
|
|
214
209
|
</li>
|
215
210
|
|
@@ -220,11 +215,13 @@ post <span class="string">'/sample03'</span> <span class="keyword">do</span></pr
|
|
220
215
|
<div class="pilwrap ">
|
221
216
|
<a class="pilcrow" href="#section-12">¶</a>
|
222
217
|
</div>
|
223
|
-
<p>
|
218
|
+
<p>Upload file from defined url</p>
|
224
219
|
|
225
220
|
</div>
|
226
221
|
|
227
|
-
<div class="content"><div class='highlight'><pre>
|
222
|
+
<div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
|
223
|
+
<span class="hljs-keyword">else</span> raise <span class="hljs-string">'Wrong GUID source.'</span>
|
224
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
228
225
|
|
229
226
|
</li>
|
230
227
|
|
@@ -235,11 +232,11 @@ post <span class="string">'/sample03'</span> <span class="keyword">do</span></pr
|
|
235
232
|
<div class="pilwrap ">
|
236
233
|
<a class="pilcrow" href="#section-13">¶</a>
|
237
234
|
</div>
|
238
|
-
<p>
|
235
|
+
<p>Prepare to sign url</p>
|
239
236
|
|
240
237
|
</div>
|
241
238
|
|
242
|
-
<div class="content"><div class='highlight'><pre>
|
239
|
+
<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>
|
243
240
|
|
244
241
|
</li>
|
245
242
|
|
@@ -250,18 +247,11 @@ post <span class="string">'/sample03'</span> <span class="keyword">do</span></pr
|
|
250
247
|
<div class="pilwrap ">
|
251
248
|
<a class="pilcrow" href="#section-14">¶</a>
|
252
249
|
</div>
|
253
|
-
<p>
|
250
|
+
<p>Construct result string</p>
|
254
251
|
|
255
252
|
</div>
|
256
253
|
|
257
|
-
<div class="content"><div class='highlight'><pre> <span class="
|
258
|
-
<span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
|
259
|
-
iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
|
260
|
-
<span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
|
261
|
-
iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
262
|
-
<span class="keyword">else</span>
|
263
|
-
iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
264
|
-
<span class="keyword">end</span></pre></div></div>
|
254
|
+
<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>
|
265
255
|
|
266
256
|
</li>
|
267
257
|
|
@@ -272,31 +262,53 @@ post <span class="string">'/sample03'</span> <span class="keyword">do</span></pr
|
|
272
262
|
<div class="pilwrap ">
|
273
263
|
<a class="pilcrow" href="#section-15">¶</a>
|
274
264
|
</div>
|
265
|
+
<p>Generate iframe URL</p>
|
266
|
+
|
267
|
+
</div>
|
268
|
+
|
269
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> base_path
|
270
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'https://stage-api-groupdocs.dynabic.com'</span>
|
271
|
+
iframe = <span class="hljs-string">"https://stage-api-groupdocs.dynabic.com<span class="hljs-subst">#{url}</span>"</span>
|
272
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'https://dev-api-groupdocs.dynabic.com'</span>
|
273
|
+
iframe = <span class="hljs-string">"https://dev-apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
|
274
|
+
<span class="hljs-keyword">else</span>
|
275
|
+
iframe = <span class="hljs-string">"https://apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
|
276
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
277
|
+
|
278
|
+
</li>
|
279
|
+
|
280
|
+
|
281
|
+
<li id="section-16">
|
282
|
+
<div class="annotation">
|
283
|
+
|
284
|
+
<div class="pilwrap ">
|
285
|
+
<a class="pilcrow" href="#section-16">¶</a>
|
286
|
+
</div>
|
275
287
|
<p>Set iframe with document GUID</p>
|
276
288
|
|
277
289
|
</div>
|
278
290
|
|
279
|
-
<div class="content"><div class='highlight'><pre> iframe = <span class="string">"<iframe src='<span class="subst">#{iframe}</span>' frameborder='0' width='720' height='600'></iframe>"</span>
|
291
|
+
<div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"<iframe src='<span class="hljs-subst">#{iframe}</span>' frameborder='0' width='720' height='600'></iframe>"</span>
|
280
292
|
|
281
|
-
<span class="keyword">rescue</span> <span class="constant">Exception</span> => e
|
293
|
+
<span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> => e
|
282
294
|
err = e.message
|
283
|
-
<span class="keyword">end</span></pre></div></div>
|
295
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
284
296
|
|
285
297
|
</li>
|
286
298
|
|
287
299
|
|
288
|
-
<li id="section-
|
300
|
+
<li id="section-17">
|
289
301
|
<div class="annotation">
|
290
302
|
|
291
303
|
<div class="pilwrap ">
|
292
|
-
<a class="pilcrow" href="#section-
|
304
|
+
<a class="pilcrow" href="#section-17">¶</a>
|
293
305
|
</div>
|
294
306
|
<p>Set variables for template</p>
|
295
307
|
|
296
308
|
</div>
|
297
309
|
|
298
|
-
<div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample03</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">:err</span> => err}
|
299
|
-
<span class="keyword">end</span></pre></div></div>
|
310
|
+
<div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample03</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">:err</span> => err}
|
311
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
300
312
|
|
301
313
|
</li>
|
302
314
|
|