namespace Wallabag\ImportBundle\Import;
-interface ImportInterface
+use Psr\Log\LoggerAwareInterface;
+
+interface ImportInterface extends LoggerAwareInterface
{
/**
* Name of the import.
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();
}