X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FImportBundle%2FImport%2FImportInterface.php;h=25dc0d857fecef031ae34bbb268b3c879b6efd6e;hb=c7ea9b41f32f222fef6a59734ea0b1176bfa1f41;hp=0f9b3256949b81869eed65d53120afdcf7b43708;hpb=0aa344dc247c77376fcbf2112191f9f8b3dfc846;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ImportBundle/Import/ImportInterface.php b/src/Wallabag/ImportBundle/Import/ImportInterface.php index 0f9b3256..25dc0d85 100644 --- a/src/Wallabag/ImportBundle/Import/ImportInterface.php +++ b/src/Wallabag/ImportBundle/Import/ImportInterface.php @@ -2,7 +2,9 @@ namespace Wallabag\ImportBundle\Import; -interface ImportInterface +use Psr\Log\LoggerAwareInterface; + +interface ImportInterface extends LoggerAwareInterface { /** * Name of the import. @@ -12,34 +14,32 @@ interface ImportInterface public function getName(); /** - * Description of the import. + * Url to start the import. * * @return string */ - public function getDescription(); + public function getUrl(); /** - * Return the oauth url to authenticate the client. - * - * @param string $redirectUri Redirect url in case of error - * @param string $callbackUri Url when the authentication is complete + * Description of the import. * * @return string */ - public function oAuthRequest($redirectUri, $callbackUri); + public function getDescription(); /** - * Usually called by the previous callback to authorize the client. - * Then it return a token that can be used for next requests. + * Import content using the user token. * - * @return string + * @return bool */ - public function oAuthAuthorize(); + public function import(); /** - * Import content using the user token. + * Return an array with summary info about the import, with keys: + * - skipped + * - imported. * - * @param string $accessToken User access token + * @return array */ - public function import($accessToken); + public function getSummary(); }