iThenticate
Basic API methods
iThenticate API를 보다 쉽고 빠르게 사용하여 표절을 확인하고 예방할 수 있는 라이브러리입니다.
다음 명령을 사용하여 작곡가 패키지 관리자를 통해 설치할 수 있습니다.
composer.phar require bsobbe/ iThenticate "*"
또는 Composer.json 파일에 다음을 추가하세요.
"require": {
"bsobbe/ iThenticate ": "*"
},
설치가 완료되면 다음과 같이 라이브러리를 사용하면 됩니다.
use bsobbe iThenticate iThenticate ;
iThenticate
클래스의 인스턴스를 생성하여 라이브러리를 사용할 수 있습니다. iThenticate API 사용자 이름 과 비밀번호를 생성자에 전달해야 합니다(API에 연결하려면 SSL이 필요할 수 있음).
$ iThenticate = new iThenticate ( " Your username " , " Your password " );
결국 필요한 매개변수를 전달하면서 사용하려는 각 메서드를 호출하기만 하면 나머지는 라이브러리가 처리해 줍니다.
라이브러리와 해당 메서드를 사용하기 전에 iThenticate API 가이드를 읽어 보시기 바랍니다.
다음은 새 문서를 보내는 간단한 예입니다.
$ iThenticate = new bsobbe iThenticate iThenticate ( " username " , " password " );
//The value in result variable is the document_id of the inserted document.
$ result = $ iThenticate -> submitDocument (
" Cloud Computing " ,
" Sobhan " ,
" Bagheri " ,
" CloudComputingEssay.pdf " , //File name from the object of the uploaded temp file.
$ content , //Document content fetched with php file_get_contents() function from the document file.
649216 //Folder number to store document (You can get folder number from last part of iThenticate panel URL).
);
$ iThenticate = new bsobbe iThenticate iThenticate ( " username " , " password " );
$ result = $ iThenticate -> documentGetRequest ( 12345 );
// Since we are requesting 1 document, there should be 1 document only in the response.
$ document = reset ( $ result [ ' documents ' ]);
$ is_pending = $ document [ ' is_pending ' ]; // If the report is pending.
$ document_id = $ document [ ' id ' ];
$ processed_time = $ document [ ' processed_time ' ]; // The time the report has been created.
$ percent_match = $ document [ ' percent_match ' ]; // The percentage match for the document.
$ title = $ document [ ' title ' ]; // The submitted title of the document.
$ uploaded_time = $ document [ ' uploaded_time ' ]; // The time the document was uploaded.
// Also, $document['folder'] is available containing information related to the folder that the document is submitted
// into.
$ iThenticate = new bsobbe iThenticate iThenticate ( " username " , " password " );
$ result = $ iThenticate -> reportGetRequest ( 98765 , 1 , 1 , 1 ); // The report ID.
$ view_only_url = $ result [ ' view_only_url ' ];
$ view_only_expires = $ result [ ' view_only_expires ' ];
$ report_url = $ result [ ' report_url ' ];
iThenticate 의 API 가이드를 기반으로 자유롭게 기여 하고 새로운 방법을 추가하세요.
ReadMe.md에 메서드 사용 지침을 추가하세요.