New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tca_client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tca_client

  • 1.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

tca_client

TCAClient - the Ruby gem for the Turnitin Core API

Turnitin Core API (TCA) provides direct API access to the core functionality provided by Turnitin. TCA supports file submission, similarity report generation, group management, and visualization of report matches via Cloud Viewer or PDF download. Below is the full flow to successfully set up an integration scope, an API Key, and make calls to TCA. Integration Scope and API Key management is done via the Admin Console UI by logging in as an admin user. For more details, go to our developer portal documentation page.

Integration Scope and API Key Management

TCA API calls must provide an API Key for authentication, so you must first have at least one integration scope associated with at least one API Key to use TCA. ### Admin Console UI First, login to Admin Console UI as an Admin user with permission to create Integration Scopes, under a tenant that is licensed to use the TCA product Integration Scopes (you can create a new one, or add keys to existing)

  • Click Integrations in the side bar --> + Add Integration at top the top of the page --> Enter a name --> Add Button API Keys
  • Click Integrations in the side bar --> Create API Key Button next to a given Integration Scope --> Enter a name --> click Create and View button
  • Copy/Save the key manually or click save to clipboard button to copy it (this is the only time it will show)

TCA Flow

  • Register a webhook
  • Create a submission
  • Upload a file for the submission
  • Wait for the submission upload to process
    • If you registered a webhook, a callback will be sent to it when upload is complete
    • The status of the submission will also update to COMPLETE
  • Request a Similarity Report
  • Wait for the similarity report to process
    • If you registered a webhook, a callback will be sent to it when report is complete
    • The status of the report will also be updated to COMPLETE
  • Request a URL with parameters to view the Similarity Report

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.249
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build tca_client.gemspec

Then either install the gem locally:

gem install ./tca_client-1.0.0.gem

(for development, run gem install --dev ./tca_client-1.0.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 'tca_client', '~> 1.0.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 'tca_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 'tca_client'
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = ENV['TCA_API_KEY']
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  config.api_key_prefix['Authorization'] = 'Bearer'
  config.host = ENV['TCA_HOST']
  config.base_path = 'api/v1'
end

api_instance = TCAClient::EULAApi.new

x_turnitin_integration_name = 'integration-name' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = '1.0' # String | the version of the integration platform being used


latest_eula = api_instance.eula_version_id_get(x_turnitin_integration_name, x_turnitin_integration_version, 'latest')
p latest_eula.version

version_id = latest_eula.version # String | The EULA version ID (or `latest`) 

user_id = 'a_user'

begin
  result = api_instance.eula_version_id_accept_user_id_get(x_turnitin_integration_name, x_turnitin_integration_version, version_id, user_id)
rescue TCAClient::ApiError => e
  false
end

begin
  body = TCAClient::EulaAcceptRequest.new # EulaAcceptRequest
  body.user_id = 'a_user'
  body.language = 'en-us'
  body.accepted_timestamp = DateTime.now
  body.version = latest_eula.version

  #Accepts a particular EULA version on behalf of an external user
  result = api_instance.eula_version_id_accept_post(body, x_turnitin_integration_name, x_turnitin_integration_version, version_id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling EULAApi->eula_version_id_accept_post: #{e}"
end


begin
  #Queries the acceptences of a particular EULA version on behalf of an external user
  result = api_instance.eula_version_id_accept_user_id_get(x_turnitin_integration_name, x_turnitin_integration_version, version_id, user_id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling EULAApi->eula_version_id_accept_user_id_get: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::EULAApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
version_id = 'version_id_example' # String | The EULA version ID (or `latest`) 
opts = { 
  lang: 'lang_example' # String | The desired language of the specified EULA version
}

begin
  #Gets information about a particular EULA version
  result = api_instance.eula_version_id_get(x_turnitin_integration_name, x_turnitin_integration_version, version_id, opts)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling EULAApi->eula_version_id_get: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::EULAApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
version_id = 'version_id_example' # String | The EULA version ID (or `latest`) 
opts = { 
  lang: 'lang_example' # String | The desired language of the specified EULA version
}

begin
  #Gets the text of a particular EULA version
  result = api_instance.eula_version_id_view_get(x_turnitin_integration_name, x_turnitin_integration_version, version_id, opts)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling EULAApi->eula_version_id_view_get: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::FeaturesApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used


begin
  #Get information about what features are allowed by the current license
  result = api_instance.features_enabled_get(x_turnitin_integration_name, x_turnitin_integration_version)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling FeaturesApi->features_enabled_get: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::GroupsApi.new
body = TCAClient::AddGroupAttachmentRequest.new # AddGroupAttachmentRequest | 
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | group_id


begin
  #Add attachment to a group. will create a group if it does not exist.
  result = api_instance.add_group_attachment(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling GroupsApi->add_group_attachment: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::GroupsApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | group_id
attach_id = 'attach_id_example' # String | The attachment ID (returned from a successful group attachment request) 


begin
  #Hard delete group attachment
  api_instance.delete_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id)
rescue TCAClient::ApiError => e
  puts "Exception when calling GroupsApi->delete_group_attachment: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::GroupsApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | group_id


begin
  #Get group, group context and group context owners info
  result = api_instance.get_group(x_turnitin_integration_name, x_turnitin_integration_version, group_id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling GroupsApi->get_group: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::GroupsApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | group_id
attach_id = 'attach_id_example' # String | The attachment ID (returned from a successful group attachment request) 


begin
  #Get group attachment
  result = api_instance.get_group_attachment(x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling GroupsApi->get_group_attachment: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::GroupsApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | group_id


begin
  #Get all attachments
  result = api_instance.get_group_attachments(x_turnitin_integration_name, x_turnitin_integration_version, group_id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling GroupsApi->get_group_attachments: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::GroupsApi.new
body = TCAClient::AggregateGroup.new # AggregateGroup | 
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | group_id


begin
  #upsert group, group context and group context owners info
  result = api_instance.groups_group_id_put(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling GroupsApi->groups_group_id_put: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::GroupsApi.new
body = TCAClient::AddGroupAttachmentRequest.new # AddGroupAttachmentRequest | 
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | group_id
attach_id = 'attach_id_example' # String | The attachment ID (returned from a successful group attachment request) 


begin
  #Patch a group attachment
  result = api_instance.update_group_attachment(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling GroupsApi->update_group_attachment: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::GroupsApi.new
body = nil # Object | the attachment file
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
group_id = 'group_id_example' # String | The Group ID (required to already exist) 
attach_id = 'attach_id_example' # String | The attachment ID (returned from a successful group attachment request) 
content_disposition = 'content_disposition_example' # String | *must include the \"filename\" parameter, e.g. `inline; filename=\"MyFile.docx\"` 


begin
  #Upload Submitted File
  result = api_instance.upload_group_attachment(body, x_turnitin_integration_name, x_turnitin_integration_version, group_id, attach_id, content_disposition)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling GroupsApi->upload_group_attachment: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::IndexApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions) 


begin
  #Return index state of submission
  result = api_instance.get_index_status(x_turnitin_integration_name, x_turnitin_integration_version, id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling IndexApi->get_index_status: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::IndexApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions) 


begin
  #Index and return index state of submission
  result = api_instance.index_submission(x_turnitin_integration_name, x_turnitin_integration_version, id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling IndexApi->index_submission: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::SimilarityApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions) 
pdf_id = 'pdf_id_example' # String | The Pdf ID (returned upon a successful POST to /submissions/{submission_id}/similarity/pdf) 


begin
  #GET download pdf
  result = api_instance.download_similarity_report_pdf(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling SimilarityApi->download_similarity_report_pdf: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::SimilarityApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions) 
pdf_id = 'pdf_id_example' # String | The Pdf ID (returned upon a successful POST to /submissions/{submission_id}/similarity/pdf) 


begin
  #GET pdf download status
  result = api_instance.get_similarity_report_pdf_status(x_turnitin_integration_name, x_turnitin_integration_version, id, pdf_id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling SimilarityApi->get_similarity_report_pdf_status: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::SimilarityApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions) 


begin
  #Get Similarity Report Results
  result = api_instance.get_similarity_report_results(x_turnitin_integration_name, x_turnitin_integration_version, id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling SimilarityApi->get_similarity_report_results: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::SimilarityApi.new
body = TCAClient::SimilarityViewerUrlSettings.new # SimilarityViewerUrlSettings | 
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions) 


begin
  #Returns a URL to access Cloud Viewer
  result = api_instance.get_similarity_report_url(body, x_turnitin_integration_name, x_turnitin_integration_version, id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling SimilarityApi->get_similarity_report_url: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::SimilarityApi.new
body = TCAClient::SimilarityPutRequest.new # SimilarityPutRequest | 
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions) 


begin
  #Request Similarity Report generation
  result = api_instance.request_similarity_report(body, x_turnitin_integration_name, x_turnitin_integration_version, id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling SimilarityApi->request_similarity_report: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::SimilarityApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions) 


begin
  #Request Pdf download and returns the Pdf Id
  result = api_instance.request_similarity_report_pdf(x_turnitin_integration_name, x_turnitin_integration_version, id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling SimilarityApi->request_similarity_report_pdf: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::SubmissionApi.new
body = TCAClient::SubmissionBase.new # SubmissionBase | 
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used


begin
  #Create a new Submission
  result = api_instance.create_submission(body, x_turnitin_integration_name, x_turnitin_integration_version)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling SubmissionApi->create_submission: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::SubmissionApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions) 
opts = { 
  hard: 'false' # String | Accepts true or false indicating either hard or soft delete. A soft delete removes the associated submission report/index and changes the saved submission state to DELETED. A hard deletion completely removes the submission information from Panda and TCA and removes the associated report/index, which can not be recovered. 
}

begin
  #Deletes a submission and associated similarity report.
  result = api_instance.delete_submission(x_turnitin_integration_name, x_turnitin_integration_version, id, opts)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling SubmissionApi->delete_submission: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::SubmissionApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions) 


begin
  #Get Submission Details
  result = api_instance.get_submission_details(x_turnitin_integration_name, x_turnitin_integration_version, id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling SubmissionApi->get_submission_details: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::SubmissionApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions) 


begin
  #Recover a soft deleted submission
  result = api_instance.recover_submission(x_turnitin_integration_name, x_turnitin_integration_version, id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling SubmissionApi->recover_submission: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::SubmissionApi.new
body = nil # Object | the user's submitted file
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | The Submission ID (returned upon a successful POST to /submissions) 
content_type = 'content_type_example' # String | *Must be 'binary/octet-stream' 
content_disposition = 'content_disposition_example' # String | *must include the \"filename\" parameter, e.g. `inline; filename=\"MyFile.docx\"`. To support UTF-8 filenames, you must URL encode the header 


begin
  #Upload Submitted File
  result = api_instance.upload_submitted_file(body, x_turnitin_integration_name, x_turnitin_integration_version, id, content_type, content_disposition)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling SubmissionApi->upload_submitted_file: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::WebhookApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | 


begin
  #Delete Webhook endpoint
  api_instance.delete_webhook(x_turnitin_integration_name, x_turnitin_integration_version, id)
rescue TCAClient::ApiError => e
  puts "Exception when calling WebhookApi->delete_webhook: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::WebhookApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | 


begin
  #Get Webhook endpoint info
  result = api_instance.get_webhook(x_turnitin_integration_name, x_turnitin_integration_version, id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling WebhookApi->get_webhook: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::WebhookApi.new
body = TCAClient::WebhookPathRequest.new # WebhookPathRequest | 
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used
id = 'id_example' # String | 


begin
  #Update Webhook endpoint info
  result = api_instance.update_webhook(body, x_turnitin_integration_name, x_turnitin_integration_version, id)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling WebhookApi->update_webhook: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::WebhookApi.new
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used


begin
  #List registered Webhook endpoints
  result = api_instance.webhooks_get(x_turnitin_integration_name, x_turnitin_integration_version)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling WebhookApi->webhooks_get: #{e}"
end
# Setup authorization
TCAClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
end

api_instance = TCAClient::WebhookApi.new
body = TCAClient::WebhookWithSecret.new # WebhookWithSecret | 
x_turnitin_integration_name = 'x_turnitin_integration_name_example' # String | a human readable string representing the type of integration being used
x_turnitin_integration_version = 'x_turnitin_integration_version_example' # String | the version of the integration platform being used


begin
  #Register a Webhook endpoint
  result = api_instance.webhooks_post(body, x_turnitin_integration_name, x_turnitin_integration_version)
  p result
rescue TCAClient::ApiError => e
  puts "Exception when calling WebhookApi->webhooks_post: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://{tenantName}.{hostName}/api/v1

ClassMethodHTTP requestDescription
TCAClient::EULAApieula_version_id_accept_postPOST /eula/{version_id}/acceptAccepts a particular EULA version on behalf of an external user
TCAClient::EULAApieula_version_id_accept_user_id_getGET /eula/{version_id}/accept/{user_id}Queries the acceptences of a particular EULA version on behalf of an external user
TCAClient::EULAApieula_version_id_getGET /eula/{version_id}Gets information about a particular EULA version
TCAClient::EULAApieula_version_id_view_getGET /eula/{version_id}/viewGets the text of a particular EULA version
TCAClient::FeaturesApifeatures_enabled_getGET /features-enabledGet information about what features are allowed by the current license
TCAClient::GroupsApiadd_group_attachmentPOST /groups/{group_id}/attachmentsAdd attachment to a group. will create a group if it does not exist.
TCAClient::GroupsApidelete_group_attachmentDELETE /groups/{group_id}/attachments/{attach_id}Hard delete group attachment
TCAClient::GroupsApiget_groupGET /groups/{group_id}Get group, group context and group context owners info
TCAClient::GroupsApiget_group_attachmentGET /groups/{group_id}/attachments/{attach_id}Get group attachment
TCAClient::GroupsApiget_group_attachmentsGET /groups/{group_id}/attachmentsGet all attachments
TCAClient::GroupsApigroups_group_id_putPUT /groups/{group_id}upsert group, group context and group context owners info
TCAClient::GroupsApiupdate_group_attachmentPATCH /groups/{group_id}/attachments/{attach_id}Patch a group attachment
TCAClient::GroupsApiupload_group_attachmentPUT /groups/{group_id}/attachments/{attach_id}/originalUpload Submitted File
TCAClient::IndexApiget_index_statusGET /submissions/{id}/indexReturn index state of submission
TCAClient::IndexApiindex_submissionPUT /submissions/{id}/indexIndex and return index state of submission
TCAClient::SimilarityApidownload_similarity_report_pdfGET /submissions/{id}/similarity/pdf/{pdf_id}GET download pdf
TCAClient::SimilarityApiget_similarity_report_pdf_statusGET /submissions/{id}/similarity/pdf/{pdf_id}/statusGET pdf download status
TCAClient::SimilarityApiget_similarity_report_resultsGET /submissions/{id}/similarityGet Similarity Report Results
TCAClient::SimilarityApiget_similarity_report_urlPOST /submissions/{id}/viewer-urlReturns a URL to access Cloud Viewer
TCAClient::SimilarityApirequest_similarity_reportPUT /submissions/{id}/similarityRequest Similarity Report generation
TCAClient::SimilarityApirequest_similarity_report_pdfPOST /submissions/{id}/similarity/pdfRequest Pdf download and returns the Pdf Id
TCAClient::SubmissionApicreate_submissionPOST /submissionsCreate a new Submission
TCAClient::SubmissionApidelete_submissionDELETE /submissions/{id}Deletes a submission and associated similarity report.
TCAClient::SubmissionApiget_submission_detailsGET /submissions/{id}Get Submission Details
TCAClient::SubmissionApirecover_submissionPUT /submissions/{id}/recoverRecover a soft deleted submission
TCAClient::SubmissionApiupload_submitted_filePUT /submissions/{id}/originalUpload Submitted File
TCAClient::WebhookApidelete_webhookDELETE /webhooks/{id}Delete Webhook endpoint
TCAClient::WebhookApiget_webhookGET /webhooks/{id}Get Webhook endpoint info
TCAClient::WebhookApiupdate_webhookPATCH /webhooks/{id}Update Webhook endpoint info
TCAClient::WebhookApiwebhooks_getGET /webhooksList registered Webhook endpoints
TCAClient::WebhookApiwebhooks_postPOST /webhooksRegister a Webhook endpoint

Documentation for Models

Documentation for Authorization

api_key

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

FAQs

Package last updated on 15 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc