groupdocs 1.1.0 → 1.2.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 +41 -0
- data/examples/README.md +2 -3
- data/examples/api-samples/Gemfile +5 -0
- data/examples/api-samples/Gemfile.lock +27 -0
- data/examples/api-samples/README.md +12 -0
- data/examples/api-samples/app.rb +17 -0
- data/examples/api-samples/public/css/style.css +166 -0
- data/examples/api-samples/samples/sample1.rb +17 -0
- data/examples/api-samples/samples/sample10.rb +36 -0
- data/examples/api-samples/samples/sample2.rb +19 -0
- data/examples/api-samples/samples/sample3.rb +23 -0
- data/examples/api-samples/samples/sample4.rb +31 -0
- data/examples/api-samples/samples/sample5.rb +44 -0
- data/examples/api-samples/samples/sample6.rb +3 -0
- data/examples/api-samples/samples/sample7.rb +33 -0
- data/examples/api-samples/samples/sample8.rb +40 -0
- data/examples/api-samples/samples/sample9.rb +22 -0
- data/examples/api-samples/views/index.haml +23 -0
- data/examples/api-samples/views/layout.haml +7 -0
- data/examples/api-samples/views/sample1.haml +71 -0
- data/examples/api-samples/views/sample10.haml +69 -0
- data/examples/api-samples/views/sample2.haml +59 -0
- data/examples/api-samples/views/sample3.haml +62 -0
- data/examples/api-samples/views/sample4.haml +58 -0
- data/examples/api-samples/views/sample5.haml +62 -0
- data/examples/api-samples/views/sample6.haml +145 -0
- data/examples/api-samples/views/sample7.haml +59 -0
- data/examples/api-samples/views/sample8.haml +75 -0
- data/examples/api-samples/views/sample9.haml +61 -0
- data/examples/{annotations → viewer}/Gemfile +0 -0
- data/examples/viewer/app.rb +52 -0
- data/groupdocs.gemspec +5 -4
- data/lib/groupdocs/api.rb +1 -0
- data/lib/groupdocs/api/entity.rb +2 -0
- data/lib/groupdocs/api/helpers.rb +2 -0
- data/lib/groupdocs/api/helpers/accessor_helper.rb +30 -0
- data/lib/groupdocs/api/helpers/mime_helper.rb +21 -0
- data/lib/groupdocs/api/helpers/rest_helper.rb +3 -2
- data/lib/groupdocs/api/request.rb +1 -3
- data/lib/groupdocs/datasource.rb +1 -2
- data/lib/groupdocs/document.rb +133 -3
- data/lib/groupdocs/document/annotation.rb +14 -13
- data/lib/groupdocs/document/annotation/reply.rb +4 -8
- data/lib/groupdocs/document/annotation/reviewer.rb +2 -4
- data/lib/groupdocs/document/field.rb +10 -8
- data/lib/groupdocs/document/rectangle.rb +10 -18
- data/lib/groupdocs/job.rb +1 -1
- data/lib/groupdocs/questionnaire.rb +138 -44
- data/lib/groupdocs/questionnaire/collector.rb +262 -0
- data/lib/groupdocs/questionnaire/execution.rb +93 -10
- data/lib/groupdocs/questionnaire/question.rb +1 -2
- data/lib/groupdocs/signature.rb +16 -24
- data/lib/groupdocs/signature/contact.rb +2 -4
- data/lib/groupdocs/signature/envelope.rb +3 -6
- data/lib/groupdocs/signature/envelope/log.rb +2 -4
- data/lib/groupdocs/signature/field.rb +21 -42
- data/lib/groupdocs/signature/field/location.rb +18 -36
- data/lib/groupdocs/signature/form.rb +9 -18
- data/lib/groupdocs/signature/list.rb +1 -2
- data/lib/groupdocs/signature/recipient.rb +3 -6
- data/lib/groupdocs/signature/role.rb +4 -8
- data/lib/groupdocs/signature/shared/entity_fields.rb +12 -20
- data/lib/groupdocs/signature/template.rb +1 -2
- data/lib/groupdocs/storage/file.rb +3 -1
- data/lib/groupdocs/storage/folder.rb +7 -1
- data/lib/groupdocs/subscription.rb +6 -12
- data/lib/groupdocs/subscription/limit.rb +4 -8
- data/lib/groupdocs/user.rb +3 -6
- data/lib/groupdocs/version.rb +1 -1
- data/spec/groupdocs/api/helpers/accessor_helper_spec.rb +16 -0
- data/spec/groupdocs/api/helpers/mime_helper_spec.rb +16 -0
- data/spec/groupdocs/api/helpers/rest_helper_spec.rb +4 -0
- data/spec/groupdocs/api/request_spec.rb +3 -5
- data/spec/groupdocs/datasource/field_spec.rb +3 -6
- data/spec/groupdocs/datasource_spec.rb +8 -15
- data/spec/groupdocs/document/annotation/reply_spec.rb +13 -24
- data/spec/groupdocs/document/annotation/reviewer_spec.rb +5 -9
- data/spec/groupdocs/document/annotation_spec.rb +35 -40
- data/spec/groupdocs/document/change_spec.rb +6 -11
- data/spec/groupdocs/document/field_spec.rb +13 -13
- data/spec/groupdocs/document/metadata_spec.rb +5 -10
- data/spec/groupdocs/document/rectangle_spec.rb +6 -18
- data/spec/groupdocs/document/view_spec.rb +3 -6
- data/spec/groupdocs/document_spec.rb +123 -10
- data/spec/groupdocs/job_spec.rb +9 -18
- data/spec/groupdocs/questionnaire/collector_spec.rb +201 -0
- data/spec/groupdocs/questionnaire/execution_spec.rb +91 -23
- data/spec/groupdocs/questionnaire/page_spec.rb +3 -6
- data/spec/groupdocs/questionnaire/question/answer_spec.rb +2 -4
- data/spec/groupdocs/questionnaire/question_spec.rb +7 -14
- data/spec/groupdocs/questionnaire_spec.rb +117 -41
- data/spec/groupdocs/signature/contact_spec.rb +9 -17
- data/spec/groupdocs/signature/envelope/log_spec.rb +8 -16
- data/spec/groupdocs/signature/envelope_spec.rb +9 -17
- data/spec/groupdocs/signature/field/location_spec.rb +32 -65
- data/spec/groupdocs/signature/field_spec.rb +48 -95
- data/spec/groupdocs/signature/form_spec.rb +22 -43
- data/spec/groupdocs/signature/list_spec.rb +6 -11
- data/spec/groupdocs/signature/recipient_spec.rb +11 -22
- data/spec/groupdocs/signature/role_spec.rb +11 -21
- data/spec/groupdocs/signature/template_spec.rb +2 -4
- data/spec/groupdocs/signature_spec.rb +28 -54
- data/spec/groupdocs/storage/file_spec.rb +14 -26
- data/spec/groupdocs/storage/folder_spec.rb +16 -22
- data/spec/groupdocs/storage/package_spec.rb +2 -4
- data/spec/groupdocs/subscription/limit_spec.rb +8 -16
- data/spec/groupdocs/subscription_spec.rb +11 -22
- data/spec/groupdocs/user_spec.rb +21 -41
- data/spec/groupdocs_spec.rb +4 -8
- data/spec/spec_helper.rb +12 -0
- data/spec/support/files/signature.png +0 -0
- data/spec/support/json/annotation_list.json +6 -6
- data/spec/support/json/comparison_changes.json +8 -8
- data/spec/support/json/document_fields.json +8 -8
- data/spec/support/json/document_page_images_get.json +20 -0
- data/spec/support/json/questionnaire_collector.json +17 -0
- data/spec/support/json/questionnaire_collectors.json +38 -0
- data/spec/support/json/questionnaire_collectors_add.json +10 -0
- data/spec/support/json/questionnaire_create.json +3 -1
- data/spec/support/json/{questionnaire_execution_create.json → questionnaire_execution_add.json} +1 -1
- data/spec/support/json/questionnaire_get.json +3 -0
- data/spec/support/json/questionnaires_get.json +36 -18
- data/spec/support/json/sign_documents.json +16 -0
- data/spec/support/json/templates_get.json +21 -0
- data/spec/support/shared_examples/api/entity.rb +2 -0
- data/spec/support/shared_examples/api/helpers/access_mode_helper.rb +1 -2
- data/spec/support/shared_examples/api/helpers/status_helper.rb +1 -2
- data/spec/support/shared_examples/signature/shared/entity_fields.rb +22 -43
- metadata +82 -16
- data/examples/annotations/app.rb +0 -67
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
get '/sample7' do
|
|
2
|
+
haml :sample7
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
post '/sample7' do
|
|
6
|
+
set :client_id, params[:client_id]
|
|
7
|
+
set :private_key, params[:private_key]
|
|
8
|
+
|
|
9
|
+
begin
|
|
10
|
+
raise "Please enter all required parameters" if settings.client_id.empty? or settings.private_key.empty?
|
|
11
|
+
files_list = GroupDocs::Storage::Folder.list!('/', {:extended => true}, { :client_id => settings.client_id, :private_key => settings.private_key})
|
|
12
|
+
|
|
13
|
+
thumbnails = ''
|
|
14
|
+
files_list.each do |element|
|
|
15
|
+
if element.class.name.split('::').last == 'Folder'
|
|
16
|
+
next
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
if element.thumbnail
|
|
20
|
+
name = element.name
|
|
21
|
+
thumbnails += "<p><img src='data:image/png;base64,#{element.thumbnail}', width='40px', height='40px'> #{name}</p>"
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
unless thumbnails.empty?
|
|
26
|
+
set :thumbnails, thumbnails
|
|
27
|
+
end
|
|
28
|
+
rescue Exception => e
|
|
29
|
+
err = e.message
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
haml :sample7, :locals => { :userId => settings.client_id, :privateKey => settings.private_key, :thumbnailList => thumbnails, :err => err }
|
|
33
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
get '/sample8' do
|
|
2
|
+
haml :sample8
|
|
3
|
+
end
|
|
4
|
+
post '/sample8' do
|
|
5
|
+
set :client_id, params[:client_id]
|
|
6
|
+
set :private_key, params[:private_key]
|
|
7
|
+
set :guid, params[:guid]
|
|
8
|
+
set :page_number, params[:page_number]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# file = GroupDocs::Storage::Folder.list!.last
|
|
12
|
+
# document = file.to_document
|
|
13
|
+
# document.page_images! 1024, 768, first_page: 0, page_count: 1
|
|
14
|
+
|
|
15
|
+
begin
|
|
16
|
+
raise "Please enter all required parameters" if settings.client_id.empty? or settings.private_key.empty?
|
|
17
|
+
files_list = GroupDocs::Storage::Folder.list!('/', {}, { :client_id => settings.client_id, :private_key => settings.private_key})
|
|
18
|
+
doc = nil
|
|
19
|
+
metadata = nil
|
|
20
|
+
files_list.each do |element|
|
|
21
|
+
if element.class.name.split('::').last == 'Folder'
|
|
22
|
+
next
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
if element.guid == settings.guid
|
|
26
|
+
metadata = element.to_document.metadata!({ :client_id => settings.client_id, :private_key => settings.private_key})
|
|
27
|
+
doc = element.to_document
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
images = doc.page_images!(800, 400, {:first_page => 0, :page_count => metadata.page_count}, { :client_id => settings.client_id, :private_key => settings.private_key})
|
|
31
|
+
|
|
32
|
+
unless images.empty?
|
|
33
|
+
image = images[Integer(settings.page_number)]
|
|
34
|
+
end
|
|
35
|
+
rescue Exception => e
|
|
36
|
+
err = e.message
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
haml :sample8, :locals => { :userId => settings.client_id, :privateKey => settings.private_key, :guid =>settings.guid , :page_number=>settings.page_number, :image=>image, :err => err }
|
|
40
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
get '/sample9' do
|
|
2
|
+
haml :sample9
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
post '/sample9' do
|
|
6
|
+
set :guid, params[:guid]
|
|
7
|
+
set :width, params[:width]
|
|
8
|
+
set :height, params[:height]
|
|
9
|
+
|
|
10
|
+
begin
|
|
11
|
+
raise "Please enter all required parameters" if settings.guid.empty? or settings.width.empty? or settings.height.empty?
|
|
12
|
+
v_url = "https://apps.groupdocs.com/document-viewer/embed/#{settings.guid}?frameborder='0' width='#{settings.width}' height='#{settings.height}'"
|
|
13
|
+
|
|
14
|
+
if v_url
|
|
15
|
+
v_url = v_url
|
|
16
|
+
end
|
|
17
|
+
rescue Exception => e
|
|
18
|
+
err = e.message
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
haml :sample9, :locals => { :guid => settings.guid, :width => settings.width, :height => settings.height, :v_url=>v_url, :err => err }
|
|
22
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
%h1{:style => "text-align:center;"} GroupDocs Ruby SDK Samples
|
|
2
|
+
%div{:style => "padding:10px;"}
|
|
3
|
+
%ul
|
|
4
|
+
%li
|
|
5
|
+
%a{:href => "/sample1"}Sample1 - How to login to GroupDocs using the API
|
|
6
|
+
%li
|
|
7
|
+
%a{:href => "/sample2"}Sample2 - How to list files within GroupDocs Storage using the Storage API
|
|
8
|
+
%li
|
|
9
|
+
%a{:href => "/sample3"}Sample3 - How to upload a file to GroupDocs using the Storage API
|
|
10
|
+
%li
|
|
11
|
+
%a{:href => "/sample4"}Sample4 - How to download a file from GroupDocs Storage using the Storage API
|
|
12
|
+
%li
|
|
13
|
+
%a{:href => "/sample5"}Sample5 - How to copy / move a file using the GroupDocs Storage API
|
|
14
|
+
%li
|
|
15
|
+
%a{:href => "/sample6"}Sample6 - How to add a Signature to a document in GroupDocs Signature
|
|
16
|
+
%li
|
|
17
|
+
%a{:href => "/sample7"}Sample7 - How to create a list of thumbnails for a document
|
|
18
|
+
%li
|
|
19
|
+
%a{:href => "/sample8"}Sample8 - How to return a URL representing a single page of a Document
|
|
20
|
+
%li
|
|
21
|
+
%a{:href => "/sample9"}Sample9 - How to generate an embedded Viewer URL for a Document
|
|
22
|
+
%li
|
|
23
|
+
%a{:href => "/sample10"}Sample10 - How to share a document to other users
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
%h3{:style => "text-align:center;"}
|
|
2
|
+
%a{:href => "/"}GroupDocs Ruby SDK Samples
|
|
3
|
+
\- Sample1
|
|
4
|
+
|
|
5
|
+
.samplecontent{:style => "padding:10px;"}
|
|
6
|
+
%i This sample will show how to use Signer object to be authorized at GroupDocs and how to get GroupDocs user infromation using Ruby SDK
|
|
7
|
+
%br/
|
|
8
|
+
%br/
|
|
9
|
+
%p
|
|
10
|
+
You entered:
|
|
11
|
+
%p
|
|
12
|
+
UserId = #{(defined? userId) ? userId : ""}
|
|
13
|
+
%p
|
|
14
|
+
PrivateKey = #{(defined? privateKey) ? privateKey : ""}
|
|
15
|
+
%p
|
|
16
|
+
%font{:color => "red"} #{(defined? err) ? err : ""}
|
|
17
|
+
|
|
18
|
+
%div{:style => "padding:20px; border:1px solid black;"}
|
|
19
|
+
%p Results:
|
|
20
|
+
%table{:style => "border:1px double black;"}
|
|
21
|
+
%tr
|
|
22
|
+
%th Field
|
|
23
|
+
%th Value
|
|
24
|
+
%tr
|
|
25
|
+
%td First Name
|
|
26
|
+
%td #{(defined? user.first_name) ? user.first_name : ""}
|
|
27
|
+
%tr
|
|
28
|
+
%td Last Name
|
|
29
|
+
%td #{(defined? user.last_name) ? user.last_name : ""}
|
|
30
|
+
%tr
|
|
31
|
+
%td Nick Name
|
|
32
|
+
%td #{(defined? user.nickname) ? user.nickname : ""}
|
|
33
|
+
%tr
|
|
34
|
+
%td Primary Email
|
|
35
|
+
%td #{(defined? user.primary_email) ? user.primary_email : ""}
|
|
36
|
+
%br/
|
|
37
|
+
#requestForm{:style => "padding:20px; border:1px solid black;"}
|
|
38
|
+
%p Enter data for request and press "Make request" button
|
|
39
|
+
%form{:action => "/sample1", :enctype => "multipart/form-data", :method => "post"}
|
|
40
|
+
%label{:for => "client_id"} GroupDocs Client ID
|
|
41
|
+
%br/
|
|
42
|
+
%input{:type=>"text", :name=>"client_id"}
|
|
43
|
+
%br/
|
|
44
|
+
%label{:for => "private_key"} GroupDocs Private Key
|
|
45
|
+
%br/
|
|
46
|
+
%input{:type=>"text", :name=>"private_key"}
|
|
47
|
+
%br/
|
|
48
|
+
%input{:type => "submit", :value => "Make Request"}/
|
|
49
|
+
%div{:style => "padding:10px;"}
|
|
50
|
+
Choose anothe one sample:
|
|
51
|
+
%ul
|
|
52
|
+
%li
|
|
53
|
+
%a{:href => "/sample1"} Sample1 - How to login to GroupDocs using the API
|
|
54
|
+
%li
|
|
55
|
+
%a{:href => "/sample2"} Sample2 - How to list files within GroupDocs Storage using the Storage API
|
|
56
|
+
%li
|
|
57
|
+
%a{:href => "/sample3"} Sample3 - How to upload a file to GroupDocs using the Storage API
|
|
58
|
+
%li
|
|
59
|
+
%a{:href => "/sample4"} Sample4 - How to download a file from GroupDocs Storage using the Storage API
|
|
60
|
+
%li
|
|
61
|
+
%a{:href => "/sample5"} Sample5 - How to copy / move a file using the GroupDocs Storage API
|
|
62
|
+
%li
|
|
63
|
+
%a{:href => "/sample6"} Sample6 - How to add a Signature to a document in GroupDocs Signature
|
|
64
|
+
%li
|
|
65
|
+
%a{:href => "/sample7"} Sample7 - How to create a list of thumbnails for a document
|
|
66
|
+
%li
|
|
67
|
+
%a{:href => "/sample8"} Sample8 - How to return a URL representing a single page of a Document
|
|
68
|
+
%li
|
|
69
|
+
%a{:href => "/sample9"} Sample9 - How to generate an embedded Viewer URL for a Document
|
|
70
|
+
%li
|
|
71
|
+
%a{:href => "/sample10"} Sample10 - How to share a document to other users
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
%h3{:style => "text-align:center;"}
|
|
2
|
+
%a{:href => "/"} GroupDocs Ruby SDK Samples
|
|
3
|
+
\- Sample10
|
|
4
|
+
.samplecontent{:style => "padding:10px;"}
|
|
5
|
+
%i This sample will show how to share particular document from your GroupDocs account to other GroupDocs users using Ruby SDK
|
|
6
|
+
%br/
|
|
7
|
+
%br/
|
|
8
|
+
%p
|
|
9
|
+
You entered:
|
|
10
|
+
%p
|
|
11
|
+
client_id = #{(defined? client_id) ? client_id : ""}
|
|
12
|
+
%p
|
|
13
|
+
private_key = #{(defined? private_key) ? private_key : ""}
|
|
14
|
+
%p
|
|
15
|
+
File GUID = #{(defined? guid) ? guid : ""}
|
|
16
|
+
%p
|
|
17
|
+
Email = #{(defined? email) ? email : ""}
|
|
18
|
+
%p
|
|
19
|
+
%font{:color => "red"} #{(defined? err) ? err : ""}
|
|
20
|
+
#requestForm{:style => "padding:20px; border:1px solid black;"}
|
|
21
|
+
%p Enter data for request and press "Make request" button
|
|
22
|
+
%form{:action => "/sample10", :enctype => "multipart/form-data", :method => "post"}
|
|
23
|
+
%label{:for => "client_id"} GroupDocs ClientID
|
|
24
|
+
%br/
|
|
25
|
+
<input type='text', name='client_id' value="#{(defined? client_id) ? client_id : ""}" />
|
|
26
|
+
%br/
|
|
27
|
+
%label{:for => "private_key"} GroupDocs private_key
|
|
28
|
+
%br/
|
|
29
|
+
<input type='text', name='private_key' value="#{(defined? private_key) ? private_key : ""}" />
|
|
30
|
+
%br/
|
|
31
|
+
%label{:for => "file_Id"} GroupDocs File GUID
|
|
32
|
+
%br/
|
|
33
|
+
<input type='text', name='guid' value="#{(defined? guid) ? guid : ""}" />
|
|
34
|
+
%br/
|
|
35
|
+
%label{:for => "email"} Your email
|
|
36
|
+
%br/
|
|
37
|
+
<input type='text', name='email' value="#{(defined? email) ? email : ""}" />
|
|
38
|
+
%br/
|
|
39
|
+
%input{:type => "submit", :value => "Make Request"}/
|
|
40
|
+
%div{:style => "padding:20px; border:1px solid black;"}
|
|
41
|
+
%p
|
|
42
|
+
%h3
|
|
43
|
+
%font{:color => "green"}
|
|
44
|
+
Document shared to user with e-mail
|
|
45
|
+
%h1 #{(defined? shared) ? shared : ""}
|
|
46
|
+
%br/
|
|
47
|
+
%div{:style => "padding:10px;"}
|
|
48
|
+
Choose anothe one sample:
|
|
49
|
+
%ul
|
|
50
|
+
%li
|
|
51
|
+
%a{:href => "/sample1"} Sample1 - How to login to GroupDocs using the API
|
|
52
|
+
%li
|
|
53
|
+
%a{:href => "/sample2"} Sample2 - How to list files within GroupDocs Storage using the Storage API
|
|
54
|
+
%li
|
|
55
|
+
%a{:href => "/sample3"} Sample3 - How to upload a file to GroupDocs using the Storage API
|
|
56
|
+
%li
|
|
57
|
+
%a{:href => "/sample4"} Sample4 - How to download a file from GroupDocs Storage using the Storage API
|
|
58
|
+
%li
|
|
59
|
+
%a{:href => "/sample5"} Sample5 - How to copy / move a file using the GroupDocs Storage API
|
|
60
|
+
%li
|
|
61
|
+
%a{:href => "/sample6"} Sample6 - How to add a Signature to a document in GroupDocs Signature
|
|
62
|
+
%li
|
|
63
|
+
%a{:href => "/sample7"} Sample7 - How to create a list of thumbnails for a document
|
|
64
|
+
%li
|
|
65
|
+
%a{:href => "/sample8"} Sample8 - How to return a URL representing a single page of a Document
|
|
66
|
+
%li
|
|
67
|
+
%a{:href => "/sample9"} Sample9 - How to generate an embedded Viewer URL for a Document
|
|
68
|
+
%li
|
|
69
|
+
%a{:href => "/sample10"} Sample10 - How to share a document to other users
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
%h3{:style => "text-align:center;"}
|
|
2
|
+
%a{:href => "/"} GroupDocs Ruby SDK Samples
|
|
3
|
+
\- Sample2
|
|
4
|
+
.samplecontent{:style => "padding:10px;"}
|
|
5
|
+
%i This sample will show how to use StorageApi to list all user files from GroupDocs account using Ruby SDK
|
|
6
|
+
%br/
|
|
7
|
+
%br/
|
|
8
|
+
%p
|
|
9
|
+
You entered:
|
|
10
|
+
%p
|
|
11
|
+
UserId = #{(defined? userId) ? userId : ""}
|
|
12
|
+
%p
|
|
13
|
+
PrivateKey = #{(defined? privateKey) ? privateKey : ""}
|
|
14
|
+
%p
|
|
15
|
+
%font{:color => "red"} #{(defined? err) ? err : ""}
|
|
16
|
+
#requestForm{:style => "padding:20px; border:1px solid black;"}
|
|
17
|
+
%p Enter data for request and press "Make request" button
|
|
18
|
+
%form{:action => "/sample2", :enctype => "multipart/form-data", :method => "post"}
|
|
19
|
+
%label{:for => "client_id"} GroupDocs ClientID
|
|
20
|
+
%br/
|
|
21
|
+
%input{:type=>"text", :name=>"client_id"}
|
|
22
|
+
%br/
|
|
23
|
+
%label{:for => "private_key"} GroupDocs PrivateKey
|
|
24
|
+
%br/
|
|
25
|
+
%input{:type=>"text", :name=>"private_key"}
|
|
26
|
+
%br/
|
|
27
|
+
%input{:type => "submit", :value => "Make Request"}/
|
|
28
|
+
%div{:style => "padding:20px; border:1px solid black;"}
|
|
29
|
+
%p Results:
|
|
30
|
+
%table{:style => "border:1px double black;"}
|
|
31
|
+
%tr
|
|
32
|
+
%th Field
|
|
33
|
+
%th Value
|
|
34
|
+
%tr
|
|
35
|
+
%td Files list
|
|
36
|
+
%td #{(defined? filelist) ? filelist : ""}
|
|
37
|
+
%div{:style => "padding:10px;"}
|
|
38
|
+
Choose anothe one sample:
|
|
39
|
+
%ul
|
|
40
|
+
%li
|
|
41
|
+
%a{:href => "/sample1"} Sample1 - How to login to GroupDocs using the API
|
|
42
|
+
%li
|
|
43
|
+
%a{:href => "/sample2"} Sample2 - How to list files within GroupDocs Storage using the Storage API
|
|
44
|
+
%li
|
|
45
|
+
%a{:href => "/sample3"} Sample3 - How to upload a file to GroupDocs using the Storage API
|
|
46
|
+
%li
|
|
47
|
+
%a{:href => "/sample4"} Sample4 - How to download a file from GroupDocs Storage using the Storage API
|
|
48
|
+
%li
|
|
49
|
+
%a{:href => "/sample5"} Sample5 - How to copy / move a file using the GroupDocs Storage API
|
|
50
|
+
%li
|
|
51
|
+
%a{:href => "/sample6"} Sample6 - How to add a Signature to a document in GroupDocs Signature
|
|
52
|
+
%li
|
|
53
|
+
%a{:href => "/sample7"} Sample7 - How to create a list of thumbnails for a document
|
|
54
|
+
%li
|
|
55
|
+
%a{:href => "/sample8"} Sample8 - How to return a URL representing a single page of a Document
|
|
56
|
+
%li
|
|
57
|
+
%a{:href => "/sample9"} Sample9 - How to generate an embedded Viewer URL for a Document
|
|
58
|
+
%li
|
|
59
|
+
%a{:href => "/sample10"} Sample10 - How to share a document to other users
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
%h3{:style => "text-align:center;"}
|
|
2
|
+
%a{:href => "/index.php"} GroupDocs PHP SDK Samples
|
|
3
|
+
\- Sample3
|
|
4
|
+
.samplecontent{:style => "padding:10px;"}
|
|
5
|
+
%i This sample will show how to use StorageApi to upload test file to GroupDocs account using PHP SDK
|
|
6
|
+
%br/
|
|
7
|
+
%br/
|
|
8
|
+
%p
|
|
9
|
+
You entered:
|
|
10
|
+
%p
|
|
11
|
+
UserId = #{(defined? userId) ? userId : ""}
|
|
12
|
+
%p
|
|
13
|
+
PrivateKey = #{(defined? privateKey) ? privateKey : ""}
|
|
14
|
+
%p
|
|
15
|
+
%font{:color => "red"} #{(defined? err) ? err : ""}
|
|
16
|
+
%br/
|
|
17
|
+
#requestForm{:style => "padding:20px; border:1px solid black;"}
|
|
18
|
+
%p Enter data for request and press "Make request" button
|
|
19
|
+
%form{:action => "/sample3", :enctype => "multipart/form-data", :method => "post"}
|
|
20
|
+
%label{:for => "client_id"} GroupDocs ClientID
|
|
21
|
+
%br/
|
|
22
|
+
%input{:type=>"text", :name=>"client_id"}
|
|
23
|
+
%br/
|
|
24
|
+
%label{:for => "private_key"} GroupDocs PrivateKey
|
|
25
|
+
%br/
|
|
26
|
+
%input{:type=>"text", :name=>"private_key"}
|
|
27
|
+
%br/
|
|
28
|
+
%label{:for => "file"} File
|
|
29
|
+
%br/
|
|
30
|
+
%input{:name => "file", :type => "file"}/
|
|
31
|
+
%br/
|
|
32
|
+
%br/
|
|
33
|
+
%input{:type => "submit", :value => "Upload"}/
|
|
34
|
+
%div{:style => "padding:20px; border:1px solid black;"}
|
|
35
|
+
%p
|
|
36
|
+
Results:
|
|
37
|
+
#{(defined? massage) ? massage : ""}
|
|
38
|
+
#{(defined? iframe) ? iframe : ""}
|
|
39
|
+
|
|
40
|
+
%div{:style => "padding:10px;"}
|
|
41
|
+
Choose anothe one sample:
|
|
42
|
+
%ul
|
|
43
|
+
%li
|
|
44
|
+
%a{:href => "/sample1"} Sample1 - How to login to GroupDocs using the API
|
|
45
|
+
%li
|
|
46
|
+
%a{:href => "/sample2"} Sample2 - How to list files within GroupDocs Storage using the Storage API
|
|
47
|
+
%li
|
|
48
|
+
%a{:href => "/sample3"} Sample3 - How to upload a file to GroupDocs using the Storage API
|
|
49
|
+
%li
|
|
50
|
+
%a{:href => "/sample4"} Sample4 - How to download a file from GroupDocs Storage using the Storage API
|
|
51
|
+
%li
|
|
52
|
+
%a{:href => "/sample5"} Sample5 - How to copy / move a file using the GroupDocs Storage API
|
|
53
|
+
%li
|
|
54
|
+
%a{:href => "/sample6"} Sample6 - How to add a Signature to a document in GroupDocs Signature
|
|
55
|
+
%li
|
|
56
|
+
%a{:href => "/sample7"} Sample7 - How to create a list of thumbnails for a document
|
|
57
|
+
%li
|
|
58
|
+
%a{:href => "/sample8"} Sample8 - How to return a URL representing a single page of a Document
|
|
59
|
+
%li
|
|
60
|
+
%a{:href => "/sample9"} Sample9 - How to generate an embedded Viewer URL for a Document
|
|
61
|
+
%li
|
|
62
|
+
%a{:href => "/sample10"} Sample10 - How to share a document to other users
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
%h3{:style => "text-align:center;"}
|
|
2
|
+
%a{:href => "/"} GroupDocs Ruby SDK Samples
|
|
3
|
+
\- Sample4
|
|
4
|
+
.samplecontent{:style => "padding:10px;"}
|
|
5
|
+
%i This sample will show how to download particular file from GroupDocs account using Ruby SDK
|
|
6
|
+
%br/
|
|
7
|
+
%br/
|
|
8
|
+
%p
|
|
9
|
+
You entered:
|
|
10
|
+
%p
|
|
11
|
+
UserId = #{(defined? userId) ? userId : ""}
|
|
12
|
+
%p
|
|
13
|
+
PrivateKey = #{(defined? privateKey) ? privateKey : ""}
|
|
14
|
+
%p
|
|
15
|
+
FileId = #{(defined? file_id) ? file_id : ""}
|
|
16
|
+
%p
|
|
17
|
+
%font{:color => "red"} #{(defined? err) ? err : ""}
|
|
18
|
+
#requestForm{:style => "padding:20px; border:1px solid black;"}
|
|
19
|
+
%p Enter data for request and press "Download" button
|
|
20
|
+
%form{:action => "/sample4", :enctype => "multipart/form-data", :method => "post"}
|
|
21
|
+
%label{:for => "client_id"} GroupDocs ClientID
|
|
22
|
+
%br/
|
|
23
|
+
%input{:type=>"text", :name=>"client_id"}
|
|
24
|
+
%br/
|
|
25
|
+
%label{:for => "private_key"} GroupDocs PrivateKey
|
|
26
|
+
%br/
|
|
27
|
+
%input{:type=>"text", :name=>"private_key"}
|
|
28
|
+
%br/
|
|
29
|
+
%label{:for => "private_key"} FileID
|
|
30
|
+
%br/
|
|
31
|
+
%input{:type=>"text", :name=>"file_id"}
|
|
32
|
+
%br/
|
|
33
|
+
%input{:type => "submit", :value => "Download"}/
|
|
34
|
+
#{(defined? massage) ? massage : ""}
|
|
35
|
+
%br/
|
|
36
|
+
%div{:style => "padding:10px;"}
|
|
37
|
+
Choose another one sample:
|
|
38
|
+
%ul
|
|
39
|
+
%li
|
|
40
|
+
%a{:href => "/sample1"} Sample1 - How to login to GroupDocs using the API
|
|
41
|
+
%li
|
|
42
|
+
%a{:href => "/sample2"} Sample2 - How to list files within GroupDocs Storage using the Storage API
|
|
43
|
+
%li
|
|
44
|
+
%a{:href => "/sample3"} Sample3 - How to upload a file to GroupDocs using the Storage API
|
|
45
|
+
%li
|
|
46
|
+
%a{:href => "/sample4"} Sample4 - How to download a file from GroupDocs Storage using the Storage API
|
|
47
|
+
%li
|
|
48
|
+
%a{:href => "/sample5"} Sample5 - How to copy / move a file using the GroupDocs Storage API
|
|
49
|
+
%li
|
|
50
|
+
%a{:href => "/sample6"} Sample6 - How to add a Signature to a document in GroupDocs Signature
|
|
51
|
+
%li
|
|
52
|
+
%a{:href => "/sample7"} Sample7 - How to create a list of thumbnails for a document
|
|
53
|
+
%li
|
|
54
|
+
%a{:href => "/sample8"} Sample8 - How to return a URL representing a single page of a Document
|
|
55
|
+
%li
|
|
56
|
+
%a{:href => "/sample9"} Sample9 - How to generate an embedded Viewer URL for a Document
|
|
57
|
+
%li
|
|
58
|
+
%a{:href => "/sample10"} Sample10 - How to share a document to other users
|