Skip to content

Commit

Permalink
take a look at the results
Browse files Browse the repository at this point in the history
  • Loading branch information
emarchak committed Apr 15, 2016
1 parent dab310b commit 87dff23
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/ImportService.php
Expand Up @@ -93,12 +93,25 @@ public function import() {

// Check the result of our search request.
try {
if ($response->getReasonPhrase() != 'OK') {
throw new Exception(t(
'Received status @status',
array('$status' => $response->getReasonPhrase())
));
}

// If we have something, list the results.
$results = [];
$data = $this->serialization_json->decode($response->getBody());
$results = $data['items'];

// Loop through the results.
for ($i = 0; isset($results[$i]); $i++) {
// Create the video URL.

// Check to see if we have the video url imported.
$is_new = TRUE;
// If we don't have it imported, import it.
if ($is_new) {}

// Increment our imported count on successful import.
$imported++;
Expand Down

0 comments on commit 87dff23

Please sign in to comment.