aspose_email_cloud 20.10.0 → 20.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aspose-email-cloud/api/ai_bcr_api.rb +4 -4
- data/lib/aspose-email-cloud/api/ai_name_api.rb +4 -4
- data/lib/aspose-email-cloud/api/calendar_api.rb +4 -4
- data/lib/aspose-email-cloud/api/client_account_api.rb +4 -4
- data/lib/aspose-email-cloud/api/client_folder_api.rb +4 -4
- data/lib/aspose-email-cloud/api/client_message_api.rb +4 -4
- data/lib/aspose-email-cloud/api/client_thread_api.rb +4 -4
- data/lib/aspose-email-cloud/api/contact_api.rb +4 -4
- data/lib/aspose-email-cloud/api/disposable_email_api.rb +4 -4
- data/lib/aspose-email-cloud/api/email_api.rb +5 -5
- data/lib/aspose-email-cloud/api/email_cloud.rb +5 -5
- data/lib/aspose-email-cloud/api/email_config_api.rb +4 -4
- data/lib/aspose-email-cloud/api/file_api.rb +4 -4
- data/lib/aspose-email-cloud/api/folder_api.rb +4 -4
- data/lib/aspose-email-cloud/api/mapi_calendar_api.rb +4 -4
- data/lib/aspose-email-cloud/api/mapi_contact_api.rb +4 -4
- data/lib/aspose-email-cloud/api/mapi_message_api.rb +4 -4
- data/lib/aspose-email-cloud/api/storage_api.rb +4 -4
- data/lib/aspose-email-cloud/api_client.rb +4 -4
- data/lib/aspose-email-cloud/api_invoker.rb +2 -2
- data/lib/aspose-email-cloud/configuration.rb +11 -11
- data/lib/aspose-email-cloud/version.rb +1 -1
- 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: 98c75fe010400ae4891ce803ea59fee5e4530906bfcb3996065972e26ef36841
|
4
|
+
data.tar.gz: 811860eebc195a763942b2900cb6ce55e7e1fd6a8fc1b839fcf988725b67c50d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29f99e42ac525bd806e8f7fd3c0d9c354cde93eb09c372dec7f5b9350900ab8c07cb5e50ec20164f7b7dbcfd4e567afe962ffa6492ec7ac6ba41b6b7fbc2f5eb
|
7
|
+
data.tar.gz: 244e3b546cacbe815c9498a653dc363225060c7e896fb0c4d16e169699b0e4a2e5a70cf16d6cba26006b4e1d6dd3f9099139f858aa34cd5ab45c351f1d087d9e
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the AiBcrApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the AiBcrApi class.
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the AiNameApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the AiNameApi class.
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the CalendarApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the CalendarApi class.
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the ClientAccountApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the ClientAccountApi class.
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the ClientFolderApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the ClientFolderApi class.
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the ClientMessageApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the ClientMessageApi class.
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the ClientThreadApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the ClientThreadApi class.
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the ContactApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the ContactApi class.
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the DisposableEmailApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the DisposableEmailApi class.
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the EmailApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the EmailApi class.
|
@@ -46,7 +46,7 @@ module AsposeEmailCloud
|
|
46
46
|
@api_invoker = api_invoker
|
47
47
|
end
|
48
48
|
|
49
|
-
# Converts Email model to specified format and returns as file.
|
49
|
+
# Converts Email model to a specified format and returns as a file.
|
50
50
|
# @param [EmailAsFileRequest] request Email model and format to convert.
|
51
51
|
# @return [File]
|
52
52
|
def as_file(request)
|
@@ -40,7 +40,7 @@ module AsposeEmailCloud
|
|
40
40
|
# Email document (*.eml) operations.
|
41
41
|
attr_reader :email
|
42
42
|
|
43
|
-
#
|
43
|
+
# Checks if an email is a disposable one
|
44
44
|
attr_reader :disposable_email
|
45
45
|
|
46
46
|
# Email server configuration discovery.
|
@@ -62,13 +62,13 @@ module AsposeEmailCloud
|
|
62
62
|
|
63
63
|
|
64
64
|
# Initializes a new instance of the EmailApi class.
|
65
|
-
# @param [String]
|
66
|
-
# @param [String]
|
65
|
+
# @param [String] client_secret Key to access the server.
|
66
|
+
# @param [String] client_id ID to access the server.
|
67
67
|
# @param [String] base_url Server URL.
|
68
68
|
# @param [String] api_version Api version.
|
69
69
|
# @param [Object] debug Debug switch [true, false].
|
70
|
-
def initialize(
|
71
|
-
api_client = ApiClient.new(
|
70
|
+
def initialize(client_secret = nil, client_id = nil, base_url = 'api.aspose.cloud', api_version = 'v4.0', debug = false)
|
71
|
+
api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
72
72
|
@api_invoker = ApiInvoker.new(api_client)
|
73
73
|
|
74
74
|
@calendar = CalendarApi.new(@api_invoker)
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the EmailConfigApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the EmailConfigApi class.
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the FileApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the FileApi class.
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the FolderApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the FolderApi class.
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the MapiCalendarApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the MapiCalendarApi class.
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the MapiContactApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the MapiContactApi class.
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the MapiMessageApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the MapiMessageApi class.
|
@@ -31,13 +31,13 @@ module AsposeEmailCloud
|
|
31
31
|
attr_reader :api_invoker
|
32
32
|
|
33
33
|
# Initializes a new instance of the StorageApi class.
|
34
|
-
# @param [String]
|
35
|
-
# @param [String]
|
34
|
+
# @param [String] client_secret Key to access the server.
|
35
|
+
# @param [String] client_id ID to access the server.
|
36
36
|
# @param [String] base_url Server URL.
|
37
37
|
# @param [String] api_version Api version.
|
38
38
|
# @param [Object] debug Debug switch [true, false].
|
39
|
-
# def initialize(
|
40
|
-
# @api_client = ApiClient.new(
|
39
|
+
# def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
40
|
+
# @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
|
41
41
|
# end
|
42
42
|
|
43
43
|
# Initializes a new instance of the StorageApi class.
|
@@ -47,13 +47,13 @@ module AsposeEmailCloud
|
|
47
47
|
attr_accessor :default_headers
|
48
48
|
|
49
49
|
# Initializes the ApiClient
|
50
|
-
# @param [String]
|
51
|
-
# @param [String]
|
50
|
+
# @param [String] client_secret Key to access the server.
|
51
|
+
# @param [String] client_id ID to access the server.
|
52
52
|
# @param [String] base_url Server URL.
|
53
53
|
# @param [String] api_version Api version.
|
54
54
|
# @param [Object] debug Debug switch [true, false].
|
55
|
-
def initialize(
|
56
|
-
@config = Configuration.new(
|
55
|
+
def initialize(client_secret = nil, client_id = nil, base_url = 'api.aspose.cloud', api_version = 'v4.0', debug = false)
|
56
|
+
@config = Configuration.new(client_secret, client_id, base_url, api_version, debug)
|
57
57
|
@default_headers = {
|
58
58
|
'x-aspose-client' => 'ruby sdk'
|
59
59
|
}
|
@@ -83,8 +83,8 @@ module AsposeEmailCloud
|
|
83
83
|
def request_token_form_params(config)
|
84
84
|
{
|
85
85
|
'grant_type': 'client_credentials',
|
86
|
-
'client_id': config.
|
87
|
-
'client_secret': config.
|
86
|
+
'client_id': config.client_credentials[:client_id],
|
87
|
+
'client_secret': config.client_credentials[:client_secret]
|
88
88
|
}
|
89
89
|
end
|
90
90
|
end
|
@@ -51,9 +51,9 @@ module AsposeEmailCloud
|
|
51
51
|
#
|
52
52
|
# @return [Hash] key: parameter name, value: parameter value (API key)
|
53
53
|
#
|
54
|
-
# @example parameter name is "
|
55
|
-
# config.
|
56
|
-
attr_accessor :
|
54
|
+
# @example parameter name is "client_secret", API key is "xxx" (e.g. "client_secret=xxx" in query string)
|
55
|
+
# config.client_secret['client_secret'] = 'xxx'
|
56
|
+
attr_accessor :client_credentials
|
57
57
|
|
58
58
|
# Defines API key prefixes used with API Key authentications.
|
59
59
|
#
|
@@ -152,19 +152,19 @@ module AsposeEmailCloud
|
|
152
152
|
attr_accessor :force_ending_format
|
153
153
|
|
154
154
|
# Initializes a new instance.
|
155
|
-
# @param [String]
|
156
|
-
# @param [String]
|
155
|
+
# @param [String] client_secret Key to access the server.
|
156
|
+
# @param [String] client_id ID to access the server.
|
157
157
|
# @param [String] base_url Server URL.
|
158
158
|
# @param [String] api_version Api version.
|
159
159
|
# @param [Object] debug Debug switch [true, false].
|
160
|
-
def initialize(
|
160
|
+
def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v4.0', debug = false)
|
161
161
|
@scheme = 'https'
|
162
162
|
self.host = base_url
|
163
163
|
self.auth_url = base_url
|
164
164
|
@api_version = api_version
|
165
165
|
self.base_path = @api_version
|
166
|
-
@
|
167
|
-
|
166
|
+
@client_credentials = { 'client_secret': client_secret || '',
|
167
|
+
'client_id': client_id || '' }
|
168
168
|
@api_key_prefix = {}
|
169
169
|
@timeout = 0
|
170
170
|
@client_side_validation = true
|
@@ -177,7 +177,7 @@ module AsposeEmailCloud
|
|
177
177
|
@inject_format = false
|
178
178
|
@force_ending_format = false
|
179
179
|
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
180
|
-
@on_premise = (!(
|
180
|
+
@on_premise = (!(client_secret || client_id) && base_url)
|
181
181
|
|
182
182
|
yield(self) if block_given?
|
183
183
|
end
|
@@ -213,9 +213,9 @@ module AsposeEmailCloud
|
|
213
213
|
# @param [String] param_name the parameter name of API key auth
|
214
214
|
def api_key_with_prefix(param_name)
|
215
215
|
if @api_key_prefix[param_name]
|
216
|
-
"#{@api_key_prefix[param_name]} #{@
|
216
|
+
"#{@api_key_prefix[param_name]} #{@client_credentials[param_name]}"
|
217
217
|
else
|
218
|
-
@
|
218
|
+
@client_credentials[param_name]
|
219
219
|
end
|
220
220
|
end
|
221
221
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aspose_email_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 20.
|
4
|
+
version: 20.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aspose.Email team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|