Retrieve created date from Pocket
This commit is contained in:
parent
13470c3596
commit
7f7531171f
src/Wallabag/ImportBundle/Import
tests/Wallabag/ImportBundle/Import
@ -254,6 +254,10 @@ class PocketImport extends AbstractImport
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($importedEntry['time_added'])) {
|
||||||
|
$entry->setCreatedAt((new \DateTime())->setTimestamp($importedEntry['time_added']));
|
||||||
|
}
|
||||||
|
|
||||||
$this->em->persist($entry);
|
$this->em->persist($entry);
|
||||||
++$this->importedEntries;
|
++$this->importedEntries;
|
||||||
|
|
||||||
|
@ -165,10 +165,16 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
|
|||||||
"given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland",
|
"given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland",
|
||||||
"favorite": "1",
|
"favorite": "1",
|
||||||
"status": "1",
|
"status": "1",
|
||||||
|
"time_added": "1473020899",
|
||||||
|
"time_updated": "1473020899",
|
||||||
|
"time_read": "0",
|
||||||
|
"time_favorited": "0",
|
||||||
|
"sort_id": 0,
|
||||||
"resolved_title": "The Massive Ryder Cup Preview",
|
"resolved_title": "The Massive Ryder Cup Preview",
|
||||||
"resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview",
|
"resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview",
|
||||||
"excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.",
|
"excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.",
|
||||||
"is_article": "1",
|
"is_article": "1",
|
||||||
|
"is_index": "0",
|
||||||
"has_video": "1",
|
"has_video": "1",
|
||||||
"has_image": "1",
|
"has_image": "1",
|
||||||
"word_count": "3197",
|
"word_count": "3197",
|
||||||
@ -212,10 +218,16 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
|
|||||||
"given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland",
|
"given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland",
|
||||||
"favorite": "1",
|
"favorite": "1",
|
||||||
"status": "1",
|
"status": "1",
|
||||||
|
"time_added": "1473020899",
|
||||||
|
"time_updated": "1473020899",
|
||||||
|
"time_read": "0",
|
||||||
|
"time_favorited": "0",
|
||||||
|
"sort_id": 1,
|
||||||
"resolved_title": "The Massive Ryder Cup Preview",
|
"resolved_title": "The Massive Ryder Cup Preview",
|
||||||
"resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview",
|
"resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview",
|
||||||
"excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.",
|
"excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.",
|
||||||
"is_article": "1",
|
"is_article": "1",
|
||||||
|
"is_index": "0",
|
||||||
"has_video": "0",
|
"has_video": "0",
|
||||||
"has_image": "0",
|
"has_image": "0",
|
||||||
"word_count": "3197"
|
"word_count": "3197"
|
||||||
@ -278,6 +290,11 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
|
|||||||
"given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland",
|
"given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland",
|
||||||
"favorite": "1",
|
"favorite": "1",
|
||||||
"status": "1",
|
"status": "1",
|
||||||
|
"time_added": "1473020899",
|
||||||
|
"time_updated": "1473020899",
|
||||||
|
"time_read": "0",
|
||||||
|
"time_favorited": "0",
|
||||||
|
"sort_id": 0,
|
||||||
"excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.",
|
"excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.",
|
||||||
"is_article": "1",
|
"is_article": "1",
|
||||||
"has_video": "1",
|
"has_video": "1",
|
||||||
@ -291,6 +308,11 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
|
|||||||
"given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland",
|
"given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland",
|
||||||
"favorite": "1",
|
"favorite": "1",
|
||||||
"status": "0",
|
"status": "0",
|
||||||
|
"time_added": "1473020899",
|
||||||
|
"time_updated": "1473020899",
|
||||||
|
"time_read": "0",
|
||||||
|
"time_favorited": "0",
|
||||||
|
"sort_id": 1,
|
||||||
"excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.",
|
"excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.",
|
||||||
"is_article": "1",
|
"is_article": "1",
|
||||||
"has_video": "0",
|
"has_video": "0",
|
||||||
@ -358,6 +380,11 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
|
|||||||
"given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland",
|
"given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland",
|
||||||
"favorite": "1",
|
"favorite": "1",
|
||||||
"status": "1",
|
"status": "1",
|
||||||
|
"time_added": "1473020899",
|
||||||
|
"time_updated": "1473020899",
|
||||||
|
"time_read": "0",
|
||||||
|
"time_favorited": "0",
|
||||||
|
"sort_id": 0,
|
||||||
"resolved_title": "The Massive Ryder Cup Preview",
|
"resolved_title": "The Massive Ryder Cup Preview",
|
||||||
"resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview",
|
"resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview",
|
||||||
"excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.",
|
"excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user