class AsposeEmailCloud::AiNameApi
AiNameApi
operations.
Attributes
Public Class Methods
Initializes a new instance of the AiNameApi
class. @param [ApiInvoker] api_invoker
# File lib/aspose-email-cloud/api/ai_name_api.rb, line 45 def initialize(api_invoker) @api_invoker = api_invoker end
Public Instance Methods
The call proposes k most probable names for given starting characters.
@param [AiNameCompleteRequest] request Request object. @return [AiNameWeightedVariants]
# File lib/aspose-email-cloud/api/ai_name_api.rb, line 52 def complete(request) http_request = request.to_http_info(@api_invoker.api_client) @api_invoker.make_request(http_request, :GET, 'AiNameWeightedVariants') end
Expands a person's name into a list of possible alternatives using options for expanding instructions.
@param [AiNameExpandRequest] request Request object. @return [AiNameWeightedVariants]
# File lib/aspose-email-cloud/api/ai_name_api.rb, line 60 def expand(request) http_request = request.to_http_info(@api_invoker.api_client) @api_invoker.make_request(http_request, :GET, 'AiNameWeightedVariants') end
Expands a person's parsed name into a list of possible alternatives using options for expanding instructions.
@param [AiNameParsedRequest] request Parsed name with options. @return [AiNameWeightedVariants]
# File lib/aspose-email-cloud/api/ai_name_api.rb, line 68 def expand_parsed(request) # verify the required parameter 'request' is set if @api_invoker.api_client.config.client_side_validation && request.nil? raise ArgumentError, "Missing the required parameter 'request' when calling AiNameApi.expand_parsed" end local_var_path = '/email/AiName/expand-parsed' post_body = @api_invoker.api_client.object_to_http_body(request) auth_names = ['JWT'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = EmailRequest.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = EmailRequest.select_header_content_type(['application/json']) http_request = AsposeEmailCloud::HttpRequest.new(resource_path: local_var_path, header_params: header_params, body: post_body, auth_names: auth_names) @api_invoker.make_request(http_request, :PUT, 'AiNameWeightedVariants') end
Formats a person's name in correct case and name order using options for formatting instructions.
@param [AiNameFormatRequest] request Request object. @return [AiNameFormatted]
# File lib/aspose-email-cloud/api/ai_name_api.rb, line 95 def format(request) http_request = request.to_http_info(@api_invoker.api_client) @api_invoker.make_request(http_request, :GET, 'AiNameFormatted') end
Formats a person's parsed name in correct case and name order using options for formatting instructions.
@param [AiNameParsedRequest] request Parsed name with options. @return [AiNameFormatted]
# File lib/aspose-email-cloud/api/ai_name_api.rb, line 103 def format_parsed(request) # verify the required parameter 'request' is set if @api_invoker.api_client.config.client_side_validation && request.nil? raise ArgumentError, "Missing the required parameter 'request' when calling AiNameApi.format_parsed" end local_var_path = '/email/AiName/format-parsed' post_body = @api_invoker.api_client.object_to_http_body(request) auth_names = ['JWT'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = EmailRequest.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = EmailRequest.select_header_content_type(['application/json']) http_request = AsposeEmailCloud::HttpRequest.new(resource_path: local_var_path, header_params: header_params, body: post_body, auth_names: auth_names) @api_invoker.make_request(http_request, :PUT, 'AiNameFormatted') end
Detect person's gender from name string.
@param [AiNameGenderizeRequest] request Request object. @return [AiNameGenderHypothesisList]
# File lib/aspose-email-cloud/api/ai_name_api.rb, line 130 def genderize(request) http_request = request.to_http_info(@api_invoker.api_client) @api_invoker.make_request(http_request, :GET, 'AiNameGenderHypothesisList') end
Detect person's gender from parsed name.
@param [AiNameParsedRequest] request Gender detection request data. @return [AiNameGenderHypothesisList]
# File lib/aspose-email-cloud/api/ai_name_api.rb, line 138 def genderize_parsed(request) # verify the required parameter 'request' is set if @api_invoker.api_client.config.client_side_validation && request.nil? raise ArgumentError, "Missing the required parameter 'request' when calling AiNameApi.genderize_parsed" end local_var_path = '/email/AiName/genderize-parsed' post_body = @api_invoker.api_client.object_to_http_body(request) auth_names = ['JWT'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = EmailRequest.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = EmailRequest.select_header_content_type(['application/json']) http_request = AsposeEmailCloud::HttpRequest.new(resource_path: local_var_path, header_params: header_params, body: post_body, auth_names: auth_names) @api_invoker.make_request(http_request, :PUT, 'AiNameGenderHypothesisList') end
Compare people's names. Uses options for comparing instructions.
@param [AiNameMatchRequest] request Request object. @return [AiNameMatchResult]
# File lib/aspose-email-cloud/api/ai_name_api.rb, line 165 def match(request) http_request = request.to_http_info(@api_invoker.api_client) @api_invoker.make_request(http_request, :GET, 'AiNameMatchResult') end
Compare people's parsed names and attributes. Uses options for comparing instructions.
@param [AiNameMatchParsedRequest] request Parsed names to match. @return [AiNameMatchResult]
# File lib/aspose-email-cloud/api/ai_name_api.rb, line 173 def match_parsed(request) # verify the required parameter 'request' is set if @api_invoker.api_client.config.client_side_validation && request.nil? raise ArgumentError, "Missing the required parameter 'request' when calling AiNameApi.match_parsed" end local_var_path = '/email/AiName/match-parsed' post_body = @api_invoker.api_client.object_to_http_body(request) auth_names = ['JWT'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = EmailRequest.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = EmailRequest.select_header_content_type(['application/json']) http_request = AsposeEmailCloud::HttpRequest.new(resource_path: local_var_path, header_params: header_params, body: post_body, auth_names: auth_names) @api_invoker.make_request(http_request, :PUT, 'AiNameMatchResult') end
Parse name to components.
@param [AiNameParseRequest] request Request object. @return [AiNameComponentList]
# File lib/aspose-email-cloud/api/ai_name_api.rb, line 200 def parse(request) http_request = request.to_http_info(@api_invoker.api_client) @api_invoker.make_request(http_request, :GET, 'AiNameComponentList') end
Parse person's name out of an email address.
@param [AiNameParseEmailAddressRequest] request Request object. @return [AiNameExtractedList]
# File lib/aspose-email-cloud/api/ai_name_api.rb, line 208 def parse_email_address(request) http_request = request.to_http_info(@api_invoker.api_client) @api_invoker.make_request(http_request, :GET, 'AiNameExtractedList') end