cloudmersive-phishing-detection-api-client

CloudmersivePhishingDetectionApiClient - the Ruby gem for the phishingapi

Easily and directly scan and block phishing security threats in input.

This SDK is automatically generated by the Swagger Codegen project:

  • API version: v1
  • Package version: 2.2.4
  • Build package: io.swagger.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build cloudmersive-phishing-detection-api-client.gemspec

Then either install the gem locally:

gem install ./cloudmersive-phishing-detection-api-client-2.2.4.gem

(for development, run gem install --dev ./cloudmersive-phishing-detection-api-client-2.2.4.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'cloudmersive-phishing-detection-api-client', '~> 2.2.4'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'cloudmersive-phishing-detection-api-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'cloudmersive-phishing-detection-api-client'

# Setup authorization
CloudmersivePhishingDetectionApiClient.configure do |config|
  # Configure API key authorization: Apikey
  config.api_key['Apikey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Apikey'] = 'Bearer'
end

api_instance = CloudmersivePhishingDetectionApiClient::PhishingDetectionApi.new

opts = { 
  body: CloudmersivePhishingDetectionApiClient::AdvancedEmailDetectionRequest.new # AdvancedEmailDetectionRequest | Phishing detection request
}

begin
  #Perform advanced AI phishing detection and classification against input email.  Supports email input as a file (PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, HTML, EML, MSG, PNG, JPG, WEBP) or as an HTML body string.  Analyzes input email as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content.  Uses 25-100 API calls depending on model selected.
  result = api_instance.phishing_detect_email_advanced_post(opts)
  p result
rescue CloudmersivePhishingDetectionApiClient::ApiError => e
  puts "Exception when calling PhishingDetectionApi->phishing_detect_email_advanced_post: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://localhost

Class Method HTTP request Description
CloudmersivePhishingDetectionApiClient::PhishingDetectionApi phishing_detect_email_advanced_post POST /phishing/detect/email/advanced Perform advanced AI phishing detection and classification against input email. Supports email input as a file (PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, HTML, EML, MSG, PNG, JPG, WEBP) or as an HTML body string. Analyzes input email as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
CloudmersivePhishingDetectionApiClient::PhishingDetectionApi phishing_detect_file_advanced_post POST /phishing/detect/file/advanced Perform advanced AI phishing detection and classification on an input image or document (PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, HTML, EML, MSG, PNG, JPG, WEBP). Analyzes input content as well as embedded URLs with AI deep learning to detect phishing, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
CloudmersivePhishingDetectionApiClient::PhishingDetectionApi phishing_detect_file_post POST /phishing/detect/file Perform AI phishing detection and classification on an input image or document (PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, HTML, EML, MSG, PNG, JPG, WEBP). Analyzes input content as well as embedded URLs with AI deep learning to detect phishing and other unsafe content. Uses 100-125 API calls depending on model selected.
CloudmersivePhishingDetectionApiClient::PhishingDetectionApi phishing_detect_text_string_advanced_post POST /phishing/detect/text-string/advanced Perform advanced AI phishing detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learning to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
CloudmersivePhishingDetectionApiClient::PhishingDetectionApi phishing_detect_text_string_post POST /phishing/detect/text-string Perform AI phishing detection against input text string. Returns a clean/not-clean result with confidence level and optional rationale.
CloudmersivePhishingDetectionApiClient::PhishingDetectionApi phishing_detect_url_advanced_post POST /phishing/detect/url/advanced Perform advanced AI phishing detection and classification against an input URL. Retrieves the URL content, checks for SSRF threats, and analyzes the page with AI deep learning to detect phishing and other unsafe content. Uses 100-125 API calls.

Documentation for Models

Documentation for Authorization

Apikey

  • Type: API key
  • API key parameter name: Apikey
  • Location: HTTP header