]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/ImportInterface.php
Rewrote Pocket Import
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / ImportInterface.php
index 0f9b3256949b81869eed65d53120afdcf7b43708..8cf238aab7a3e721d38a672d7c77869b8c50c92d 100644 (file)
@@ -2,7 +2,9 @@
 
 namespace Wallabag\ImportBundle\Import;
 
-interface ImportInterface
+use Psr\Log\LoggerAwareInterface;
+
+interface ImportInterface extends LoggerAwareInterface
 {
     /**
      * Name of the import.
@@ -19,27 +21,18 @@ interface ImportInterface
     public function getDescription();
 
     /**
-     * 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
-     *
-     * @return string
-     */
-    public function oAuthRequest($redirectUri, $callbackUri);
-
-    /**
-     * 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();
 }