aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Import/ImportInterface.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-12-30 12:23:51 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-01-02 23:27:41 +0100
commit252ebd60719d32ec954d0519c9edf2b52b03310c (patch)
tree044c97abeda75c33901d8bfcd33fa107279b1778 /src/Wallabag/ImportBundle/Import/ImportInterface.php
parentb4b592a0c0ee356e81775baf8f9976288d7b686c (diff)
downloadwallabag-252ebd60719d32ec954d0519c9edf2b52b03310c.tar.gz
wallabag-252ebd60719d32ec954d0519c9edf2b52b03310c.tar.zst
wallabag-252ebd60719d32ec954d0519c9edf2b52b03310c.zip
Rewrote Pocket Import
For the moment, we won't do a queue system, just a plain synchronous import. We also use ContentProxy to grab content for each article from Pocket. Error from Pocket are now logged using the logger. The ImportInterface need to be simple and not related to oAuth (not all import will use that method).
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/ImportInterface.php')
-rw-r--r--src/Wallabag/ImportBundle/Import/ImportInterface.php29
1 files changed, 11 insertions, 18 deletions
diff --git a/src/Wallabag/ImportBundle/Import/ImportInterface.php b/src/Wallabag/ImportBundle/Import/ImportInterface.php
index 0f9b3256..8cf238aa 100644
--- a/src/Wallabag/ImportBundle/Import/ImportInterface.php
+++ b/src/Wallabag/ImportBundle/Import/ImportInterface.php
@@ -2,7 +2,9 @@
2 2
3namespace Wallabag\ImportBundle\Import; 3namespace Wallabag\ImportBundle\Import;
4 4
5interface ImportInterface 5use Psr\Log\LoggerAwareInterface;
6
7interface ImportInterface extends LoggerAwareInterface
6{ 8{
7 /** 9 /**
8 * Name of the import. 10 * Name of the import.
@@ -19,27 +21,18 @@ interface ImportInterface
19 public function getDescription(); 21 public function getDescription();
20 22
21 /** 23 /**
22 * Return the oauth url to authenticate the client. 24 * Import content using the user token.
23 *
24 * @param string $redirectUri Redirect url in case of error
25 * @param string $callbackUri Url when the authentication is complete
26 *
27 * @return string
28 */
29 public function oAuthRequest($redirectUri, $callbackUri);
30
31 /**
32 * Usually called by the previous callback to authorize the client.
33 * Then it return a token that can be used for next requests.
34 * 25 *
35 * @return string 26 * @return bool
36 */ 27 */
37 public function oAuthAuthorize(); 28 public function import();
38 29
39 /** 30 /**
40 * Import content using the user token. 31 * Return an array with summary info about the import, with keys:
32 * - skipped
33 * - imported.
41 * 34 *
42 * @param string $accessToken User access token 35 * @return array
43 */ 36 */
44 public function import($accessToken); 37 public function getSummary();
45} 38}