/**
* {@inheritdoc}
*/
- protected function prepareEntry($entry = [])
+ protected function prepareEntry(array $entry = [])
{
$data = [
- 'title' => $entry['name'],
- 'html' => '',
- 'url' => $entry['url'],
- 'is_archived' => $this->markAsRead,
- 'tags' => '',
- 'created_at' => $entry['date_added'],
- ];
-
- if (array_key_exists('tags', $entry) && $entry['tags'] != '') {
+ 'title' => $entry['title'],
+ 'html' => false,
+ 'url' => $entry['uri'],
+ 'is_archived' => (int) $this->markAsRead,
+ 'is_starred' => false,
+ 'tags' => '',
+ 'created_at' => substr($entry['dateAdded'], 0, 10),
+ ];
+
+ if (array_key_exists('tags', $entry) && '' !== $entry['tags']) {
$data['tags'] = $entry['tags'];
}
return $data;
}
-
- /**
- * {@inheritdoc}
- */
- protected function setEntryAsRead(array $importedEntry)
- {
- $importedEntry['is_archived'] = 1;
-
- return $importedEntry;
- }
}