Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API-97 #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions source/includes/_reviews.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ $batchApi = new BatchApi($api);
$batchId = $batchApi->create();
if ($batchId) {
printf('Created batch ID %d%s', $batchId, PHP_EOL);
foreach ($profileUrls as $profileUrl) {
$result = $api->call('/v4/ld/fetch-reviews-by-business-data', array(
'batch-id' => $batchId,
'business-names' => 'Le Bernardin',
Expand All @@ -194,8 +193,7 @@ if ($batchId) {
));
if ($result['success']) {
printf('Added job with ID %d%s', $result['job-id'], PHP_EOL);
}
}
}
if ($batchApi->commit($batchId)) {
echo 'Committed batch successfully.'.PHP_EOL;
// poll for results, in a real world example you might
Expand Down Expand Up @@ -223,8 +221,7 @@ batchApi batchRequest = new batchApi(Api);
int batchId = batchRequest.Create();

// Add jobs to batch
foreach (var item in localDirectories)
{

var parameters = new api.Parameters();
parameters.Add("batch-id", batchId);
parameters.Add("business-names", "Le Bernardin\nLe Bernardin Cafe");
Expand All @@ -249,7 +246,7 @@ foreach (var item in localDirectories)
{
throw new ApplicationException(jobId.ErrorMessage);
}
}

// Commit the batch, resturns true or false
bool commit = batchRequest.Commit(batchId);

Expand Down