- if (!empty($pocketEntry['tags'])) {
- $this->assignTagsToEntry($entry, $pocketEntry['tags']);
- }
+ /**
+ * Set the Guzzle client.
+ *
+ * @param Client $client
+ */
+ public function setClient(Client $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'];
+
+ $existingEntry = $this->em
+ ->getRepository('WallabagCoreBundle:Entry')
+ ->findByUrlAndUserId($url, $this->user->getId());