Skip to content

Copyleaks finds plagiarism online using copyright infringement detection technology. Find those who have used your content with Copyleaks. See here how to integrate Copyleaks easily with your services, using Java, to detect plagiarism.

License

Copyleaks/.net-core-plagiarism-checker

Repository files navigation

Copyleaks API C# SDK

Copyleaks SDK is a simple framework that allows you to perform plagiarism scans and track content distribution around the web, using Copyleaks API.

With Copyleaks SDK you can submit a scan for:

  • Webpages
  • Local files - pdf, doc, docx, rtf and more (see full list)
  • Free text
  • OCR (Optical Character Recognition) - scanning pictures containing textual content (see full list)
Instructions for using the SDK are below. For a quick example demonstrating the SDK capabilities just look at the code examples under “examples”.

Integration

You can integrate with the Copyleaks SDK in one of two ways:

  1. Download the code from here, compile it and add reference to the assembly.
  2. Add Copyleaks NuGet by running the following command in the Package Manager Console
  3. Install-Package Copyleaks
    

Signing Up and Getting Your API Key

To use the Copyleaks API you need to be a registered user. Signing up is quick and free of charge.

Signup to Copyleaks and confirm your account by clicking the link on the confirmation email. Generate your personal API key on your dashboard (dashboard/) under 'API Access Credentials'.

For more information check out our API guide.

Example

The Copyleaks system architecture was built to support the asynchronous model.
The asynchronous model allows you to get notified immediately when your scan status changes, without having to call any other methods.
For more details see: webhooks and single file scan

See the SubmittingScanExample.cs file.

You can run it as a test with Program.cs file which found in SampleWebApplication directory.

Waiting for webhooks:

[HttpPost]
[Route("http://webhook.url.com/completed/{scanId}")]
public ActionResult Completed([FromRoute]string scanId, [FromBody] CompletedCallback model)
{
	Console.WriteLine($"scan {scanId} has found {model.Results.Score.IdenticalWords} identical copied words");
	// Do something with completed scan...
	return Ok();
}

[HttpPost]
[Route("http://webhook.url.com/indexed/{scanId}")]
public ActionResult Indexed([FromRoute]string scanId, [FromBody] IndexOnlyCallback model)
{
	Console.WriteLine($"scan {scanId} was indexed");
	return Ok();
}

[HttpPost]
[Route("http://webhook.url.com/creditsChecked/{scanId}")]
public ActionResult Credits([FromRoute]string scanId, [FromBody] CreditsCheckCallback model)
{
	Console.WriteLine($"scan {scanId} will consume {model.Credits}");
	// Decide whether or not to trigger the scan...
	return Ok();
}

[HttpPost]
[Route("http://webhook.url.com/error/{scanId}")]
public ActionResult Error([FromRoute]string scanId, [FromBody] ErrorCallback model)
{
	Console.WriteLine($"scan {scanId} completed with error: {model.Error.Message}");
	// Do something  with the error...
	return Ok();
}

[HttpPost]
[Route("http://webhook.url.com/results/{scanId}")]
public ActionResult NewResultWebhook([FromRoute]string scanId, [FromBody] NewResultCallback model)
{
	Console.WriteLine($"scan {scanId} got a new result");
	// Do something with the result...
	return Ok();
}

To change the Identity server URI (default:"https://id.copyleaks.com"):

ConfigurationManager.IdEndPoint = "";

To change the API server URI (default:"https://api.copyleaks.com"):

ConfigurationManager.ApiEndPoint = "";

Dependencies:

Referenced Assemblies:

Read More

About

Copyleaks finds plagiarism online using copyright infringement detection technology. Find those who have used your content with Copyleaks. See here how to integrate Copyleaks easily with your services, using Java, to detect plagiarism.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages