]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/ImportInterface.php
Replace Wallabag v1 error strings with v2 strings
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / ImportInterface.php
index 0f9b3256949b81869eed65d53120afdcf7b43708..25dc0d857fecef031ae34bbb268b3c879b6efd6e 100644 (file)
@@ -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();
 }