Skip to content

Commit

Permalink
Update README file
Browse files Browse the repository at this point in the history
  • Loading branch information
PacoVu committed Dec 22, 2015
1 parent 2a4d083 commit 0432c5c
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ HODClient class exposes source code so you can modify it as you wish.
>Note:
>In the case of a parameter type is an array<>, the value must be defined as an array() or [].
>For Example:
>E.g.:
```
$sources = array();
array_push($sources, "http://www.cnn.com");
Expand Down Expand Up @@ -76,7 +75,9 @@ $paramArr = array(
function requestCompleted($response) {
echo $response;
}

// Direct response mode
$response = GetRequest($paramArr, HODApps::ENTITY_EXTRACTION, REQ_MODE::SYNC);
echo $response;
----
**Function PostRequest**

Expand All @@ -91,8 +92,7 @@ $paramArr = array(
>Note:
>In the case of a parameter type is an array<>, the value must be defined as an array() or [].
>For Example:
>E.g.:
```
$sources = array();
array_push($sources, "http://www.cnn.com");
Expand All @@ -117,14 +117,17 @@ $paramArr = array(
'file' => "full/path/filename.jpg",
'mode' => "document_photo")
);

$hodClient->PostRequest($paramArr, HODApps::OCR_DOCUMENT, REQ_MODE::ASYNC, 'requestCompleted');
// Callback mode
$hodClient->PostRequest($paramArr, HODApps::OCR_DOCUMENT, REQ_MODE::ASYNC, 'requestCompletedWithJobID');

// callback function
function requestCompleted($response) {
echo $response;
function requestCompletedWithJobID($jobID) {
// use $jobID with GetJobResult() or GetJobStatus() function;
}


// Direct response mode
$jobID = $hodClient->PostRequest($paramArr, HODApps::OCR_DOCUMENT, REQ_MODE::ASYNC);
// use $jobID with GetJobResult() or GetJobStatus() function;
----
**Function GetJobResult**

Expand Down

0 comments on commit 0432c5c

Please sign in to comment.