wallabag/src/Wallabag/ImportBundle/Import/ImportInterface.php

46 lines
992 B
PHP
Raw Normal View History

2015-10-23 12:01:27 +00:00
<?php
namespace Wallabag\ImportBundle\Import;
interface ImportInterface
{
/**
* Name of the import.
*
* @return string
*/
public function getName();
/**
* Description of the import.
*
* @return string
*/
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
*/
2015-10-23 12:01:27 +00:00
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.
*
* @return string
*/
2015-10-23 12:01:27 +00:00
public function oAuthAuthorize();
/**
* Import content using the user token.
*
* @param string $accessToken User access token
*/
2015-10-23 12:01:27 +00:00
public function import($accessToken);
}