Class: GroupDocsComparisonCloud::ReviewApi
- Inherits:
-
Object
- Object
- GroupDocsComparisonCloud::ReviewApi
- Defined in:
- lib/groupdocs_comparison_cloud/api/review_api.rb
Overview
GroupDocs.Comparison Cloud API
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Class Method Summary collapse
-
.from_config(config) ⇒ ReviewApi
Initializes new instance of ReviewApi.
-
.from_keys(app_sid, app_key) ⇒ ReviewApi
Initializes new instance of ReviewApi.
Instance Method Summary collapse
-
#apply_revisions(request) ⇒ Link
Accepts or rejects revisions in DOCX document.
-
#apply_revisions_with_http_info(request) ⇒ Array<(Link, Fixnum, Hash)>
Accepts or rejects revisions in DOCX document.
-
#get_revisions(request) ⇒ Array<RevisionInfo>
Get list of DOCX document revisions.
-
#get_revisions_with_http_info(request) ⇒ Array<(Array<RevisionInfo>, Fixnum, Hash)>
Get list of DOCX document revisions.
-
#initialize(config) ⇒ ReviewApi
constructor
Initializes new instance of ReviewApi.
Constructor Details
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
34 35 36 |
# File 'lib/groupdocs_comparison_cloud/api/review_api.rb', line 34 def config @config end |
Class Method Details
.from_config(config) ⇒ ReviewApi
Initializes new instance of ReviewApi
63 64 65 |
# File 'lib/groupdocs_comparison_cloud/api/review_api.rb', line 63 def self.from_config(config) return new(config) end |
.from_keys(app_sid, app_key) ⇒ ReviewApi
Initializes new instance of ReviewApi
54 55 56 57 |
# File 'lib/groupdocs_comparison_cloud/api/review_api.rb', line 54 def self.from_keys(app_sid, app_key) config = Configuration.new(app_sid, app_key) return new(config) end |
Instance Method Details
#apply_revisions(request) ⇒ Link
Accepts or rejects revisions in DOCX document
71 72 73 74 |
# File 'lib/groupdocs_comparison_cloud/api/review_api.rb', line 71 def apply_revisions(request) data, _status_code, _headers = apply_revisions_with_http_info(request) data end |
#apply_revisions_with_http_info(request) ⇒ Array<(Link, Fixnum, Hash)>
Accepts or rejects revisions in DOCX document
Link data, response status code and response headers
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/groupdocs_comparison_cloud/api/review_api.rb', line 81 def apply_revisions_with_http_info(request) raise ArgumentError, 'Incorrect request type' unless request.is_a? ApplyRevisionsRequest @api_client.config.logger.debug 'Calling API: ReviewApi.apply_revisions ...' if @api_client.config.debugging # verify the required parameter 'revision_options' is set raise ArgumentError, 'Missing the required parameter revision_options when calling ReviewApi.apply_revisions' if @api_client.config.client_side_validation && request..nil? # resource path local_var_path = '/comparison/revisions' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request.) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, access_token: get_access_token, return_type: 'Link') if @api_client.config.debugging @api_client.config.logger.debug "API called: ReviewApi#apply_revisions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#get_revisions(request) ⇒ Array<RevisionInfo>
Get list of DOCX document revisions.
123 124 125 126 |
# File 'lib/groupdocs_comparison_cloud/api/review_api.rb', line 123 def get_revisions(request) data, _status_code, _headers = get_revisions_with_http_info(request) data end |
#get_revisions_with_http_info(request) ⇒ Array<(Array<RevisionInfo>, Fixnum, Hash)>
Get list of DOCX document revisions.
Array<RevisionInfo> data, response status code and response headers
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/groupdocs_comparison_cloud/api/review_api.rb', line 133 def get_revisions_with_http_info(request) raise ArgumentError, 'Incorrect request type' unless request.is_a? GetRevisionsRequest @api_client.config.logger.debug 'Calling API: ReviewApi.get_revisions ...' if @api_client.config.debugging # verify the required parameter 'file_info' is set raise ArgumentError, 'Missing the required parameter file_info when calling ReviewApi.get_revisions' if @api_client.config.client_side_validation && request.file_info.nil? # resource path local_var_path = '/comparison/revisions' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request.file_info) data, status_code, headers = @api_client.call_api(:POST, local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, access_token: get_access_token, return_type: 'Array<RevisionInfo>') if @api_client.config.debugging @api_client.config.logger.debug "API called: ReviewApi#get_revisions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |