Skip to content

Commit

Permalink
Work on #14.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjordan committed Dec 11, 2018
1 parent 9832337 commit aef5804
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Command/PluginFetchResourceListFromDrupal.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$response = $client->request('GET', $url, [
'http_errors' => false,
'headers' => [$this->jsonapi_authorization_headers[0]], // @todo: Loop through this array and add each header.
'query' => ['page[offset]' => '1', 'page[limit]' => '3']
'query' => ['page[offset]' => '1', 'page[limit]' => '50']
]);
$status_code = $response->getStatusCode();
// var_dump($status_code);
Expand Down Expand Up @@ -91,7 +91,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
// In that case, we need to figure out how to get Drupal's checksum for the file over HTTP.
// var_dump($media->field_media_image[0]->url);
// $output->writeln($media['field_media_image'][0]['url']);
var_dump($media['field_media_image'][0]['url']);
if (isset($media['field_media_image'])) {
var_dump($media['field_media_image'][0]['url']);
} else {
var_dump($media['field_media_file'][0]['url']);
}
}
}
}
Expand Down

0 comments on commit aef5804

Please sign in to comment.