PHP Class Wallabag\ImportBundle\Import\PocketImport

Inheritance: extends AbstractImport
Afficher le fichier Open project: wallabag/wallabag Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( EntityManager $em, ContentProxy $contentProxy )
authorize ( string $code ) : boolean Usually called by the previous callback to authorize the client.
getAccessToken ( ) : string Only used for test purpose.
getDescription ( )
getName ( )
getRequestToken ( string $redirectUri ) : string | false Return the oauth url to authenticate the client.
getUrl ( )
import ( $offset )
parseEntry ( array $importedEntry )
setClient ( Client $client ) Set the Guzzle client.

Méthodes protégées

Méthode Description
setEntryAsRead ( array $importedEntry )

Method Details

__construct() public méthode

public __construct ( EntityManager $em, ContentProxy $contentProxy )
$em Doctrine\ORM\EntityManager
$contentProxy Wallabag\CoreBundle\Helper\ContentProxy

authorize() public méthode

Then it return a token that can be used for next requests.
public authorize ( string $code ) : boolean
$code string request_token from getRequestToken
Résultat boolean

getAccessToken() public méthode

Only used for test purpose.
public getAccessToken ( ) : string
Résultat string

getDescription() public méthode

public getDescription ( )

getName() public méthode

public getName ( )

getRequestToken() public méthode

Return the oauth url to authenticate the client.
public getRequestToken ( string $redirectUri ) : string | false
$redirectUri string Redirect url in case of error
Résultat string | false request_token for callback method

getUrl() public méthode

public getUrl ( )

import() public méthode

public import ( $offset )

parseEntry() public méthode

See also: https://getpocket.com/developer/docs/v3/retrieve
public parseEntry ( array $importedEntry )
$importedEntry array

setClient() public méthode

Set the Guzzle client.
public setClient ( Client $client )
$client GuzzleHttp\Client

setEntryAsRead() protected méthode

protected setEntryAsRead ( array $importedEntry )
$importedEntry array