aspose_slides_cloud 23.11.0 → 24.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +2 -48
- data/lib/aspose_slides_cloud/api/slides_api.rb +47 -0
- data/lib/aspose_slides_cloud/models/font_data.rb +12 -2
- data/lib/aspose_slides_cloud/version.rb +1 -1
- data/spec/api/slides_api_spec.rb +60 -0
- data/spec/use_cases/font_spec.rb +8 -2
- data/spec/use_cases/shape_spec.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40a1105135d6041814dd5fd4f682884ff7d9db51953de7dab2458223275cafdf
|
4
|
+
data.tar.gz: e8fc4120b3fd0db9e7ab51464e393b94bd7abc6942d4a4f0572753f75243ac36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 282f00a5a458fe4d80f863f29a54ee1ca7dfb2ba23996c3f553b508fb0ab340c0eede4799b2aa6d05a91fe43198024748f9680668cac00a362f726013f2e64f1
|
7
|
+
data.tar.gz: 6bce261732ef6d320fb082d3b5a0fe3f6b8776dcb14c2ac8a9fe9941ad73d8d6a54799b86cae85b9672734d8e096546608961a72d6ec537610c590fc9b64ec52
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
aspose_slides_cloud (
|
4
|
+
aspose_slides_cloud (24.1.0)
|
5
5
|
faraday (~> 1.0, >= 1.0.0)
|
6
6
|
faraday-httpclient (~> 1.0, >= 1.0.0)
|
7
7
|
httpclient (~> 2.2, >= 2.2.0)
|
@@ -11,7 +11,7 @@ GEM
|
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
13
|
ZenTest (4.12.1)
|
14
|
-
addressable (2.8.
|
14
|
+
addressable (2.8.6)
|
15
15
|
public_suffix (>= 2.0.2, < 6.0)
|
16
16
|
autotest (4.4.6)
|
17
17
|
ZenTest (>= 4.4.1)
|
@@ -43,9 +43,9 @@ GEM
|
|
43
43
|
faraday-patron (1.0.0)
|
44
44
|
faraday-rack (1.0.0)
|
45
45
|
faraday-retry (1.0.3)
|
46
|
-
hashdiff (1.0
|
46
|
+
hashdiff (1.1.0)
|
47
47
|
httpclient (2.8.3)
|
48
|
-
json (2.7.
|
48
|
+
json (2.7.1)
|
49
49
|
multipart-post (2.3.0)
|
50
50
|
public_suffix (5.0.4)
|
51
51
|
rake (12.3.3)
|
data/README.md
CHANGED
@@ -27,55 +27,9 @@ You may want to check out Aspose free [Powerpoint to PDF](https://products.aspos
|
|
27
27
|
**Web:** HTML/HTML5
|
28
28
|
**Other:** MPEG4, SWF (export whole presentations)
|
29
29
|
|
30
|
-
## Enhancements in Version
|
30
|
+
## Enhancements in Version 24.1
|
31
31
|
|
32
|
-
* Added **
|
33
|
-
* Added **StartMerge** and **StartMergeAndSave** methods to **SlidesAsyncApi**.
|
34
|
-
* Added **Progress** property to **Operation** class to enable async operation progress tracking.
|
35
|
-
|
36
|
-
## Enhancements in Version 23.10
|
37
|
-
|
38
|
-
* Added asynchronous API - **SlidesAsyncApi** class with **StartConvert**, **StartDownloadPresentation**, **GetOperationStatus**, **GetOperationResult** methods that allow tracking progress of conversion operations.
|
39
|
-
|
40
|
-
## Enhancements in Version 23.9
|
41
|
-
|
42
|
-
* Added **ReplaceImage** and **ReplaceImageOnline** methods that enable replacing images in a presentation.
|
43
|
-
|
44
|
-
## Enhancements in Version 23.7
|
45
|
-
|
46
|
-
* New methods **ReplaceTextFormatting** and **ReplaceTextFormatting** allow to replace text with formatting.
|
47
|
-
* Added **AfterAnimationType**, **Rewind** and **AfterAnimationColor** methods to **Effect** class.
|
48
|
-
* Added **TrimFromStart** and **TrimFromEnd** methods to **VideoFrame** class.
|
49
|
-
|
50
|
-
## Enhancements in Version 23.6
|
51
|
-
|
52
|
-
* Added methods ho handle VBA methods: **GetVbaProject**, **GetVbaModule**, **CreateVbaModule**, **UpdateVbaModule** and **DeleteVbaModule**. Added model classes related to VBA: **VbaProject**, **VbaModule** and **VbaReference**.
|
53
|
-
|
54
|
-
## Enhancements in Version 23.4
|
55
|
-
|
56
|
-
* Added **CreateTableRow**, **UpdateTableRow** and **DeleteTableRow** methods to add, update and delete table rows.
|
57
|
-
* Added **UpdateTableCell** method to update table cells.
|
58
|
-
* Added **MergeTableCells** and **SplitTableCell** methods to merge & split table cells.
|
59
|
-
* Added methods to get, add, modify and delete paragraphs & portions within table cells: **GetTableCellParagraph**, **GetTableCellParagraphs**, **GetTableCellPortion**, **GetTableCellPortions**, **CreateTableCellParagraph**, **CreateTableCellPortion**, **UpdateTableCellPortion**, **UpdateTableCellParagraph**, **DeleteTableCellParagraph**, **DeleteTableCellPortion**.
|
60
|
-
* New **TextFrameFormat** property in **TableCell** class allows to specify text format for table cells.
|
61
|
-
|
62
|
-
## Enhancements in Version 23.3
|
63
|
-
|
64
|
-
* Added **options** parameter to **SplitOnline** and **SplitAndSaveOnline** methods. Those options are the same as for other split & convert methods.
|
65
|
-
* Added **ShowHiddenSlides** boolean property to **ImageExportOptions** class.
|
66
|
-
|
67
|
-
## Enhancements in Version 23.2
|
68
|
-
|
69
|
-
* New **DownloadShapeFromDto** method allows to convert charts and other shapes from DTO to SVG and other formats without creating and storing presentation files.
|
70
|
-
* Added **SoundBase64** property to **Hyperlink** class to support getting and setting hyperlink sounds.
|
71
|
-
* Added **BulletFillFormat** property to **Paragraph** class.
|
72
|
-
* Added **StopPreviousSound** property to animation **Effect** class.
|
73
|
-
* Added a number of properties to **TextFrameFormat** that enable formatting shape text: **MarginLeft**, **MarginRight**, **MarginTop**, **MarginBottom**, **WrapText**, **AnchoringType**, **CenterText**, **TextVerticalType**, **AutofitType**, **ColumnCount**, **ColumnSpacing**, **KeepTextFlat**, **RotationAngle**, **DefaultParagraphFormat**.
|
74
|
-
* Added **Pdf16**, **Pdf17**, **PdfA2b**, **PdfA2a**, **PdfA2u**, **PdfA3a**, **PdfA3b** to the list of allowed values for **PdfExportOptions.Compliance** property.
|
75
|
-
|
76
|
-
## Enhancements in Version 23.1
|
77
|
-
|
78
|
-
* New **CompressEmbeddedFonts** and **CompressEmbeddedFontsOnline** methods allow to reduce the size taken by embedded fonts by excluding unused characters.
|
32
|
+
* Added **GetAvailableFonts** method to get list of installed system & custom fonts.
|
79
33
|
|
80
34
|
## Licensing
|
81
35
|
All Aspose.Slides Cloud SDKs are licensed under MIT License.
|
@@ -8877,6 +8877,53 @@ module AsposeSlidesCloud
|
|
8877
8877
|
:return_type => 'ApiInfo')
|
8878
8878
|
return data, status_code, headers
|
8879
8879
|
end
|
8880
|
+
# Returns presentation fonts info.
|
8881
|
+
# @param fonts_folder Storage folder for custom fonts.
|
8882
|
+
# @param storage Storage for custom fonts.
|
8883
|
+
def get_available_fonts(fonts_folder = nil, storage = nil)
|
8884
|
+
data, _status_code, _headers = get_available_fonts_with_http_info(fonts_folder, storage)
|
8885
|
+
data
|
8886
|
+
end
|
8887
|
+
|
8888
|
+
# Returns presentation fonts info.
|
8889
|
+
# @param fonts_folder Storage folder for custom fonts.
|
8890
|
+
# @param storage Storage for custom fonts.
|
8891
|
+
def get_available_fonts_with_http_info(fonts_folder = nil, storage = nil)
|
8892
|
+
if @api_client.config.debugging
|
8893
|
+
@api_client.config.logger.debug 'Calling API: SlidesApi.get_available_fonts ...'
|
8894
|
+
end
|
8895
|
+
|
8896
|
+
# resource path
|
8897
|
+
local_var_path = '/slides/fonts/available'
|
8898
|
+
|
8899
|
+
# query parameters
|
8900
|
+
query_params = {}
|
8901
|
+
query_params[:'fontsFolder'] = @api_client.prepare_for_query(fonts_folder) unless fonts_folder.nil?
|
8902
|
+
query_params[:'storage'] = @api_client.prepare_for_query(storage) unless storage.nil?
|
8903
|
+
|
8904
|
+
# header parameters
|
8905
|
+
header_params = {}
|
8906
|
+
# HTTP header 'Accept' (if needed)
|
8907
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
8908
|
+
# HTTP header 'Content-Type'
|
8909
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
8910
|
+
|
8911
|
+
# http body (model)
|
8912
|
+
post_body = nil
|
8913
|
+
|
8914
|
+
# form parameters
|
8915
|
+
post_files = []
|
8916
|
+
|
8917
|
+
auth_names = ['JWT']
|
8918
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
8919
|
+
:header_params => header_params,
|
8920
|
+
:query_params => query_params,
|
8921
|
+
:body => post_body,
|
8922
|
+
:files => post_files,
|
8923
|
+
:auth_names => auth_names,
|
8924
|
+
:return_type => 'FontsData')
|
8925
|
+
return data, status_code, headers
|
8926
|
+
end
|
8880
8927
|
# Read slide background info.
|
8881
8928
|
# @param name Document name.
|
8882
8929
|
# @param slide_index Slide index.
|
@@ -31,11 +31,15 @@ module AsposeSlidesCloud
|
|
31
31
|
# Returns true if font is embedded.
|
32
32
|
attr_accessor :is_embedded
|
33
33
|
|
34
|
+
# Returns true for a custom font (contained in fontsFolder directory).
|
35
|
+
attr_accessor :is_custom
|
36
|
+
|
34
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
35
38
|
def self.attribute_map
|
36
39
|
{
|
37
40
|
:'font_name' => :'FontName',
|
38
41
|
:'is_embedded' => :'IsEmbedded',
|
42
|
+
:'is_custom' => :'IsCustom',
|
39
43
|
}
|
40
44
|
end
|
41
45
|
|
@@ -44,6 +48,7 @@ module AsposeSlidesCloud
|
|
44
48
|
{
|
45
49
|
:'font_name' => :'String',
|
46
50
|
:'is_embedded' => :'BOOLEAN',
|
51
|
+
:'is_custom' => :'BOOLEAN',
|
47
52
|
}
|
48
53
|
end
|
49
54
|
|
@@ -62,6 +67,10 @@ module AsposeSlidesCloud
|
|
62
67
|
if attributes.has_key?(:'IsEmbedded')
|
63
68
|
self.is_embedded = attributes[:'IsEmbedded']
|
64
69
|
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'IsCustom')
|
72
|
+
self.is_custom = attributes[:'IsCustom']
|
73
|
+
end
|
65
74
|
end
|
66
75
|
|
67
76
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -83,7 +92,8 @@ module AsposeSlidesCloud
|
|
83
92
|
return true if self.equal?(o)
|
84
93
|
self.class == o.class &&
|
85
94
|
font_name == o.font_name &&
|
86
|
-
is_embedded == o.is_embedded
|
95
|
+
is_embedded == o.is_embedded &&
|
96
|
+
is_custom == o.is_custom
|
87
97
|
end
|
88
98
|
|
89
99
|
# @see the `==` method
|
@@ -95,7 +105,7 @@ module AsposeSlidesCloud
|
|
95
105
|
# Calculates hash code according to all attributes.
|
96
106
|
# @return [Fixnum] Hash code
|
97
107
|
def hash
|
98
|
-
[font_name, is_embedded].hash
|
108
|
+
[font_name, is_embedded, is_custom].hash
|
99
109
|
end
|
100
110
|
end
|
101
111
|
end
|
data/spec/api/slides_api_spec.rb
CHANGED
@@ -24215,6 +24215,66 @@ describe 'SlidesApi' do
|
|
24215
24215
|
end
|
24216
24216
|
end
|
24217
24217
|
|
24218
|
+
# unit tests for get_available_fonts
|
24219
|
+
# Returns presentation fonts info.
|
24220
|
+
# @param [Hash] opts the optional parameters
|
24221
|
+
# @option opts [String] :fonts_folder Storage folder for custom fonts.
|
24222
|
+
# @option opts [String] :storage Storage for custom fonts.
|
24223
|
+
# @return [FontsData]
|
24224
|
+
describe 'get_available_fonts test' do
|
24225
|
+
it 'should work' do
|
24226
|
+
paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'GetAvailableFonts', 'String')
|
24227
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'GetAvailableFonts', 'String')
|
24228
|
+
AsposeSlidesCloud::SpecUtils.initialize('GetAvailableFonts', nil, nil)
|
24229
|
+
o, c, _h = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_available_fonts_with_http_info(paramfonts_folder, paramstorage)
|
24230
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('GetAvailableFonts', nil, nil, nil)
|
24231
|
+
expect(c).to eq(code)
|
24232
|
+
expect(o).not_to be_nil
|
24233
|
+
end
|
24234
|
+
|
24235
|
+
it 'invalid fonts_folder' do
|
24236
|
+
paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'GetAvailableFonts', 'String')
|
24237
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'GetAvailableFonts', 'String')
|
24238
|
+
paramfonts_folder = AsposeSlidesCloud::SpecUtils.invalidize_param_value('fontsFolder', 'GetAvailableFonts', paramfonts_folder, 'String')
|
24239
|
+
AsposeSlidesCloud::SpecUtils.initialize('GetAvailableFonts', 'fontsFolder', paramfonts_folder)
|
24240
|
+
begin
|
24241
|
+
AsposeSlidesCloud::SpecUtils.testSlidesApi.get_available_fonts_with_http_info(paramfonts_folder, paramstorage)
|
24242
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('GetAvailableFonts', 'fontsFolder')
|
24243
|
+
fail "An exception expected"
|
24244
|
+
end
|
24245
|
+
rescue AsposeSlidesCloud::ApiError => e
|
24246
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('GetAvailableFonts', 'fontsFolder', paramfonts_folder, 'String')
|
24247
|
+
expect(e.code).to eq(code)
|
24248
|
+
expect(e.response_body).to include(message)
|
24249
|
+
rescue ArgumentError => e
|
24250
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('GetAvailableFonts', 'fontsFolder', paramfonts_folder, 'String')
|
24251
|
+
expect(400).to eq(code)
|
24252
|
+
expect(e.message).to include(message)
|
24253
|
+
end
|
24254
|
+
end
|
24255
|
+
|
24256
|
+
it 'invalid storage' do
|
24257
|
+
paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'GetAvailableFonts', 'String')
|
24258
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'GetAvailableFonts', 'String')
|
24259
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.invalidize_param_value('storage', 'GetAvailableFonts', paramstorage, 'String')
|
24260
|
+
AsposeSlidesCloud::SpecUtils.initialize('GetAvailableFonts', 'storage', paramstorage)
|
24261
|
+
begin
|
24262
|
+
AsposeSlidesCloud::SpecUtils.testSlidesApi.get_available_fonts_with_http_info(paramfonts_folder, paramstorage)
|
24263
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('GetAvailableFonts', 'storage')
|
24264
|
+
fail "An exception expected"
|
24265
|
+
end
|
24266
|
+
rescue AsposeSlidesCloud::ApiError => e
|
24267
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('GetAvailableFonts', 'storage', paramstorage, 'String')
|
24268
|
+
expect(e.code).to eq(code)
|
24269
|
+
expect(e.response_body).to include(message)
|
24270
|
+
rescue ArgumentError => e
|
24271
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('GetAvailableFonts', 'storage', paramstorage, 'String')
|
24272
|
+
expect(400).to eq(code)
|
24273
|
+
expect(e.message).to include(message)
|
24274
|
+
end
|
24275
|
+
end
|
24276
|
+
end
|
24277
|
+
|
24218
24278
|
# unit tests for get_background
|
24219
24279
|
# Read slide background info.
|
24220
24280
|
# @param name Document name.
|
data/spec/use_cases/font_spec.rb
CHANGED
@@ -24,6 +24,12 @@ require 'spec_helper'
|
|
24
24
|
|
25
25
|
describe 'UseCases' do
|
26
26
|
describe 'Fonts' do
|
27
|
+
it "get available fonts" do
|
28
|
+
response = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_available_fonts()
|
29
|
+
expect(response.list.length).to be > 1
|
30
|
+
expect(response.list[0].is_custom).not_to be_truthy
|
31
|
+
end
|
32
|
+
|
27
33
|
it "get fonts" do
|
28
34
|
folder_name = "TempSlidesSDK"
|
29
35
|
file_name = "test.pptx"
|
@@ -114,9 +120,9 @@ describe 'UseCases' do
|
|
114
120
|
source = File.binread("TestData/test.pptx")
|
115
121
|
font_name = "Calibri"
|
116
122
|
response_embedded = AsposeSlidesCloud::SpecUtils.testSlidesApi.set_embedded_font_online(source, font_name, false, "password")
|
117
|
-
expect(response_embedded.size).
|
123
|
+
expect(response_embedded.size).to be > source.size
|
118
124
|
response_deleted = AsposeSlidesCloud::SpecUtils.testSlidesApi.delete_embedded_font_online(response_embedded, font_name, "password")
|
119
|
-
expect(response_deleted.size).to
|
125
|
+
expect(response_deleted.size).to be < response_embedded.size
|
120
126
|
end
|
121
127
|
|
122
128
|
it "replace font" do
|
@@ -24,6 +24,15 @@ require 'spec_helper'
|
|
24
24
|
|
25
25
|
describe 'UseCases' do
|
26
26
|
describe 'Shapes' do
|
27
|
+
it 'shape load save' do
|
28
|
+
folder_name = "TempSlidesSDK"
|
29
|
+
file_name = "test.pptx"
|
30
|
+
AsposeSlidesCloud::SpecUtils.testSlidesApi.copy_file("TempTests/" + file_name, folder_name + "/" + file_name)
|
31
|
+
dto = AsposeSlidesCloud::SpecUtils.testSlidesApi.get_shape(file_name, 3, 1, "password", folder_name)
|
32
|
+
shape = AsposeSlidesCloud::SpecUtils.testSlidesApi.update_shape(file_name, 3, 1, dto, "password", folder_name)
|
33
|
+
expect(shape).to be_kind_of(AsposeSlidesCloud::Chart)
|
34
|
+
end
|
35
|
+
|
27
36
|
it 'shape add' do
|
28
37
|
folder_name = "TempSlidesSDK"
|
29
38
|
file_name = "test.pptx"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aspose_slides_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 24.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Putrov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|