2015-10-23 12:01:27 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Wallabag\ImportBundle\Import;
|
|
|
|
|
|
|
|
interface ImportInterface
|
|
|
|
{
|
2015-12-24 14:22:56 +00:00
|
|
|
/**
|
|
|
|
* Name of the import.
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2015-10-23 12:45:50 +00:00
|
|
|
public function getName();
|
2015-12-24 14:22:56 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Description of the import.
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2015-10-23 12:45:50 +00:00
|
|
|
public function getDescription();
|
2015-12-24 14:22:56 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
|
*/
|
2015-10-23 12:01:27 +00:00
|
|
|
public function oAuthRequest($redirectUri, $callbackUri);
|
2015-12-24 14:22:56 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Usually called by the previous callback to authorize the client.
|
|
|
|
* Then it return a token that can be used for next requests.
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2015-10-23 12:01:27 +00:00
|
|
|
public function oAuthAuthorize();
|
2015-12-24 14:22:56 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Import content using the user token.
|
|
|
|
*
|
|
|
|
* @param string $accessToken User access token
|
|
|
|
*/
|
2015-10-23 12:01:27 +00:00
|
|
|
public function import($accessToken);
|
|
|
|
}
|