If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.
If you experience errors, when you try to download a file, make sure your network policies (enforced by your company or ISP) allow downloading ZIP and/or MSI files.

インストール
パッケージは rubygems.org で入手できます。次のコマンドを実行して gem でインストールできます。
gem install groupdocs_assembly_cloud

要件
依存関係
SDK には次の gem が必要です。
| Package | Constraint |
|---|
| faraday | ~> 0.14.0 |
| mimemagic | ~> 0.3.2 |
クイックスタート
API 認証情報を取得する
GroupDocs.Assembly Cloud を使用するには、GroupDocs.Cloud Dashboard で登録し、Client ID と Client Secret を取得します。
API を初期化する
GroupDocs.Assembly Cloud SDK for Ruby の使用を開始するには、次のコードを使用します。api_key は Client Secret、app_sid は Client ID です。
require 'groupdocs_assembly_cloud'
GroupDocsAssemblyCloud.configure do |config|
config.api_key['api_key'] = "YourClientSecret"
config.api_key['app_sid'] = "YourClientId"
end
assembly_api = GroupDocsAssemblyCloud::AssemblyApi.new
詳細は base_test_context.rb を参照してください。
文書を組み立てる
初期化したら、この基本例を使ってテンプレートと JSON データから DOCX レポートを作成します。
require 'groupdocs_assembly_cloud'
GroupDocsAssemblyCloud.configure do |config|
config.api_key['api_key'] = "YourClientSecret"
config.api_key['app_sid'] = "YourClientId"
end
assembly_api = GroupDocsAssemblyCloud::AssemblyApi.new
template_file_info = GroupDocsAssemblyCloud::TemplateFileInfo.new(:FilePath => "Temp/SdkTests/ruby/TableFeatures.odt")
assemble_data = GroupDocsAssemblyCloud::AssembleOptions.new(:TemplateFileInfo => template_file_info, :SaveFormat => "docx", :ReportData => File.open("TestData/TableData.json", "rb") { |f| f.read })
request = GroupDocsAssemblyCloud::AssembleDocumentRequest.new assemble_data
result = assembly_api.assemble_document request
puts(result.length.to_s)
詳細は api_tests.rb を参照してください。
テンプレートをアップロードする
この例は組み立ての前にテンプレートをクラウドストレージへアップロードします。
require 'groupdocs_assembly_cloud'
GroupDocsAssemblyCloud.configure do |config|
config.api_key['api_key'] = "YourClientSecret"
config.api_key['app_sid'] = "YourClientId"
end
assembly_api = GroupDocsAssemblyCloud::AssemblyApi.new
file = File.new("TestData/TableFeatures.odt", "rb")
request = GroupDocsAssemblyCloud::UploadFileRequest.new(file, "Temp/SdkTests/ruby/TableFeatures.odt")
assembly_api.upload_file request
詳細は base_test_context.rb を参照してください。
対応している組み立て形式を取得する
API が組み立てられるファイル形式を取得します。
require 'groupdocs_assembly_cloud'
GroupDocsAssemblyCloud.configure do |config|
config.api_key['api_key'] = "YourClientSecret"
config.api_key['app_sid'] = "YourClientId"
end
assembly_api = GroupDocsAssemblyCloud::AssemblyApi.new
request = GroupDocsAssemblyCloud::GetSupportedFileFormatsRequest.new
result = assembly_api.get_supported_file_formats(request)
詳細は assembly_api.rb を参照してください。
ストレージ内のファイルを一覧表示する
この例は SDK テストが使うフォルダー内のファイルを一覧表示します。
require 'groupdocs_assembly_cloud'
GroupDocsAssemblyCloud.configure do |config|
config.api_key['api_key'] = "YourClientSecret"
config.api_key['app_sid'] = "YourClientId"
end
assembly_api = GroupDocsAssemblyCloud::AssemblyApi.new
request = GroupDocsAssemblyCloud::GetFilesListRequest.new("/Folder1")
result = assembly_api.get_files_list(request)
詳細は GetFilesListRequest.rb を参照してください。
GitHub のサンプル
GroupDocs.Assembly Cloud Ruby SDK リポジトリには、次を扱う SDK とテストが含まれています。
| Category | Examples |
|---|
| Assembly | テンプレートと JSON データから文書を組み立てる |
| Storage | ファイルとフォルダーのアップロード, ダウンロード, コピー, 移動, 削除 |
| Info | 対応しているファイル形式 |
サンプルの実行方法
- SDK リポジトリ をクローンまたはダウンロードします
- 認証情報を
Settings/servercreds.json に設定します gem install groupdocs_assembly_cloud を実行します- テストは
tests/api_tests.rb にあります
詳細は Getting Started を参照してください。

Document Automation | Ruby Cloud API | GroupDocs.Assembly Cloud | REST API | Document Generation | Template-Driven | Dynamic Data Merging | Rich Formatting | Conditional Content Control | List Automation | Table Automation | Barcode Generation | Hyperlink Insertion | Bookmark Creation | Checkbox Manipulation | Mail Merge | Formula Calculations | Chart Generation | Data Filtering | Data Sorting | Data Grouping | JWT Authentication | Microsoft Word | Microsoft Excel | Microsoft PowerPoint | Report Generation | Cloud-Based Flexibility | Secure API Access | Cross-platform API