cloudmersive-virus-scan-api-client

CloudmersiveVirusScanApiClient - the Ruby gem for the virusapi

The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content.

This SDK is automatically generated by the Swagger Codegen project:

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

Installation

Build a gem

To build the Ruby code into a gem:

gem build cloudmersive-virus-scan-api-client.gemspec

Then either install the gem locally:

gem install ./cloudmersive-virus-scan-api-client-2.2.0.gem

(for development, run gem install --dev ./cloudmersive-virus-scan-api-client-2.2.0.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-virus-scan-api-client', '~> 2.2.0'

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-virus-scan-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-virus-scan-api-client'

# Setup authorization
CloudmersiveVirusScanApiClient.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 = CloudmersiveVirusScanApiClient::ScanApi.new

input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.


begin
  #Scan a file for viruses
  result = api_instance.scan_file(input_file)
  p result
rescue CloudmersiveVirusScanApiClient::ApiError => e
  puts "Exception when calling ScanApi->scan_file: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.cloudmersive.com

Class Method HTTP request Description
CloudmersiveVirusScanApiClient::ScanApi scan_file POST /virus/scan/file Scan a file for viruses
CloudmersiveVirusScanApiClient::ScanApi scan_file_advanced POST /virus/scan/file/advanced Advanced Scan a file for viruses
CloudmersiveVirusScanApiClient::ScanApi scan_website POST /virus/scan/website Scan a website for malicious content and threats
CloudmersiveVirusScanApiClient::ScanCloudStorageApi scan_cloud_storage_scan_aws_s3_file POST /virus/scan/cloud-storage/aws-s3/single Scan an AWS S3 file for viruses
CloudmersiveVirusScanApiClient::ScanCloudStorageApi scan_cloud_storage_scan_aws_s3_file_advanced POST /virus/scan/cloud-storage/aws-s3/single/advanced Advanced Scan an AWS S3 file for viruses
CloudmersiveVirusScanApiClient::ScanCloudStorageApi scan_cloud_storage_scan_azure_blob POST /virus/scan/cloud-storage/azure-blob/single Scan an Azure Blob for viruses
CloudmersiveVirusScanApiClient::ScanCloudStorageApi scan_cloud_storage_scan_azure_blob_advanced POST /virus/scan/cloud-storage/azure-blob/single/advanced Advanced Scan an Azure Blob for viruses
CloudmersiveVirusScanApiClient::ScanCloudStorageApi scan_cloud_storage_scan_gcp_storage_file POST /virus/scan/cloud-storage/gcp-storage/single Scan an Google Cloud Platform (GCP) Storage file for viruses
CloudmersiveVirusScanApiClient::ScanCloudStorageApi scan_cloud_storage_scan_gcp_storage_file_advanced POST /virus/scan/cloud-storage/gcp-storage/single/advanced Advanced Scan an Google Cloud Platform (GCP) Storage file for viruses
CloudmersiveVirusScanApiClient::ScanCloudStorageApi scan_cloud_storage_scan_share_point_online_file POST /virus/scan/cloud-storage/sharepoint-online/site/single Virus Scan a file in a SharePoint Online Site Drive
CloudmersiveVirusScanApiClient::ScanCloudStorageApi scan_cloud_storage_scan_share_point_online_file_advanced POST /virus/scan/cloud-storage/sharepoint-online/site/advanced Advanced Virus Scan a file in a SharePoint Online Site Drive

Documentation for Models

Documentation for Authorization

Apikey

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