return true;
}
- /**
- * {@inheritdoc}
- */
- public function getSummary()
- {
- return [
- 'skipped' => $this->skippedEntries,
- 'imported' => $this->importedEntries,
- ];
- }
-
/**
* Set the Guzzle client.
*
$this->client = $client;
}
+ /**
+ * {@inheritdoc}
+ *
+ * @see https://getpocket.com/developer/docs/v3/retrieve
+ */
public function parseEntry(array $importedEntry)
{
$url = isset($importedEntry['resolved_url']) && $importedEntry['resolved_url'] != '' ? $importedEntry['resolved_url'] : $importedEntry['given_url'];
);
}
+ if (!empty($importedEntry['time_added'])) {
+ $entry->setCreatedAt((new \DateTime())->setTimestamp($importedEntry['time_added']));
+ }
+
$this->em->persist($entry);
++$this->importedEntries;
*/
protected function setEntryAsRead(array $importedEntry)
{
- $importedEntry['status'] = 1;
+ $importedEntry['status'] = '1';
return $importedEntry;
}