diff options
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/ImportInterface.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Import/ImportInterface.php | 29 |
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 | ||
3 | namespace Wallabag\ImportBundle\Import; | 3 | namespace Wallabag\ImportBundle\Import; |
4 | 4 | ||
5 | interface ImportInterface | 5 | use Psr\Log\LoggerAwareInterface; |
6 | |||
7 | interface 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 | } |