Skip to content

synewmark/codequiry-java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Setting your API Key

Codequiry api = new Codequiry("YOUR API KEY");

Usage

Getting account information

Account account = api.getAccount();
System.out.println(account.getName());

Getting checks

List<Check> checks = api.getChecks();
if (!checks.isEmpty()) {
    System.out.println(checks.get(0).getStatusId());
}

Creating checks (specify name and programming language)

Examples: java, c-cpp, python, csharp, txt

Check check = api.createCheck("name", "java");
System.out.println(check.getCreatedAt());

Uploading to a check (specify check_id and file (must be a zip file))

UploadResult uploadResult = api.upload(123, "./Test.zip");
System.out.println(uploadResult.getSubmissionCount());

Starting a check (specify check_id and if running database check or web check)

Check check = api.startCheck(123);
System.out.println(check.getStatusId());

Getting a check information/status

Check check = api.getCheck(123);
System.out.println(check.getId());

Getting results overview

Overview overview = api.getOverview(123);
System.out.println(overview.getOverviewURL());

Getting specific results of a submission

SubmissionResults results = api.getResults(123, "SID");
System.out.println(results.getMax());

Realtime checking progress - SocketIO

This is an example of the listener, you can call this after getting a check status or after starting a check (both will reutrn a job ID, which you can listen to). Here we will listen to specific CHECK_ID.

api.checkListen("JOB_ID", System.out::println);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%