PHP Class Evernote\Client

Afficher le fichier Open project: evernote/evernote-cloud-sdk-php Class Usage Examples

Protected Properties

Свойство Type Description
$advancedClient Evernote\AdvancedClient
$businessAuth EDAM\UserStore\AuthenticationResult
$businessNoteStore EDAM\NoteStore\NoteStoreClient
$businessToken string
$china boolean
$isBusinessUser
$logger Psr\Log\LoggerInterface
$sandbox boolean
$token string
$userNoteStore EDAM\NoteStore\NoteStoreClient

Méthodes publiques

Méthode Description
__construct ( string | null $token = null, boolean $sandbox = true, Evernote\AdvancedClient | null $advancedClient = null, Psr\Log\LoggerInterface $logger = null, boolean $china = false )
deleteNote ( Evernote\Model\Note $note ) : boolean Deletes a note
findNotesWithSearch ( $noteSearch, Evernote\Model\Notebook $notebook = null, integer $scope, integer $sortOrder, integer $maxResults = 20 ) : array | boolean Searches for notes
getAdvancedClient ( ) : Evernote\AdvancedClient Returns the advancedClient
getBusinessLinkedNotebooks ( ) : array Returns the list of notebooks shared to the user through the business account
getBusinessNoteStore ( ) : EDAM\NoteStore\NoteStoreClient | mixed Returns the business notestore
getBusinessSharedNotebooks ( ) : null Returns the list of notebooks shared by the user with her business account
getBusinessToken ( ) : string Returns the token used to access the business notestore
getChina ( ) : boolean Gets the current china flag
getNote ( $guid, null $scope = null ) : Evernote\Model\Note | null Retrieves an existing note
getNotebook ( $notebook_guid, null $scope = null ) : Evernote\Model\Notebook | null Retrieves a notebook
getSandbox ( ) : boolean Gets the current sandbox flag
getToken ( ) : string Returns the current authentication token
getUserNotestore ( ) : EDAM\NoteStore\NoteStoreClient | mixed Returns the personal notestore of the user
isAppNotebookToken ( $token ) : boolean Checks if the token is an "app notebook" one
isBusinessUser ( ) : boolean Returns a boolean indicating if the user has a business account
listLinkedNotebooks ( ) : array Returns the list of notebooks shared to the user
listNotebooks ( ) : array Returns the list of notebooks
listPersonalNotebooks ( ) : array Returns the list of personal notebooks
listSharedNotebooks ( ) : array Returns the list of notebooks shared by the user
moveNote ( Evernote\Model\Note $note, Evernote\Model\Notebook $notebook ) : Evernote\Model\Note Moves a note to another notebook
replaceNote ( Evernote\Model\Note $noteToReplace, Evernote\Model\Note $note ) : Evernote\Model\Note Replaces an existing note by another one (new or existing)
setAdvancedClient ( Evernote\AdvancedClient $advancedClient ) Sets the advancedClient
setChina ( boolean $china ) Sets the china flag to true or false
setSandbox ( boolean $sandbox ) Sets the sandbox flag to true or false
setToken ( string $token ) Sets the authentication token
shareNote ( Evernote\Model\Note $note ) : null | string Shares a note and returns the share url
uploadNote ( Evernote\Model\Note $note, Evernote\Model\Notebook $notebook = null ) : Evernote\Model\Note Sends a new Note to the API

Méthodes protégées

Méthode Description
compareByCreated ( $obj1, $obj2 )
compareByTitle ( $obj1, $obj2 )
compareByUpdated ( $obj1, $obj2 )
findNotes_findInBusinessScopeWithContext ( $context )
findNotes_findInLinkedScopeWithContext ( $context )
findNotes_findInPersonalScopeWithContext ( $context )
findNotes_listNotebooksWithContext ( $context )
findNotes_nextFindInLinkedScopeWithContext ( $context )
findNotes_processResultsWithContext ( $context )
getBusinessAuth ( ) : EDAM\UserStore\AuthenticationResult
getNoteBookByLinkedNotebook ( EDAM\Types\LinkedNotebook $linkedNotebook )
getNoteInstance ( EDAM\Types\Note $edamNote = null, $noteStore = null, $token = null )
getNoteStore ( $noteStoreUrl ) ************************
getShardIdFromToken ( $token )
getShareUrl ( $guid, $shardId, $shareKey, $serviceHost )
getSharedNotebookAuthResult ( EDAM\Types\LinkedNotebook $linkedNotebook )
isFlagSet ( $flags, $flag )

Method Details

__construct() public méthode

public __construct ( string | null $token = null, boolean $sandbox = true, Evernote\AdvancedClient | null $advancedClient = null, Psr\Log\LoggerInterface $logger = null, boolean $china = false )
$token string | null
$sandbox boolean
$advancedClient Evernote\AdvancedClient | null
$logger Psr\Log\LoggerInterface
$china boolean

compareByCreated() protected méthode

protected compareByCreated ( $obj1, $obj2 )

compareByTitle() protected méthode

protected compareByTitle ( $obj1, $obj2 )

compareByUpdated() protected méthode

protected compareByUpdated ( $obj1, $obj2 )

deleteNote() public méthode

Deletes a note
public deleteNote ( Evernote\Model\Note $note ) : boolean
$note Evernote\Model\Note
Résultat boolean

findNotesWithSearch() public méthode

Searches for notes
public findNotesWithSearch ( $noteSearch, Evernote\Model\Notebook $notebook = null, integer $scope, integer $sortOrder, integer $maxResults = 20 ) : array | boolean
$noteSearch
$notebook Evernote\Model\Notebook
$scope integer
$sortOrder integer
$maxResults integer
Résultat array | boolean

findNotes_findInBusinessScopeWithContext() protected méthode

findNotes_findInLinkedScopeWithContext() protected méthode

findNotes_findInPersonalScopeWithContext() protected méthode

findNotes_listNotebooksWithContext() protected méthode

protected findNotes_listNotebooksWithContext ( $context )

findNotes_nextFindInLinkedScopeWithContext() protected méthode

findNotes_processResultsWithContext() protected méthode

protected findNotes_processResultsWithContext ( $context )

getAdvancedClient() public méthode

Returns the advancedClient
public getAdvancedClient ( ) : Evernote\AdvancedClient
Résultat Evernote\AdvancedClient

getBusinessAuth() protected méthode

protected getBusinessAuth ( ) : EDAM\UserStore\AuthenticationResult
Résultat EDAM\UserStore\AuthenticationResult

getBusinessLinkedNotebooks() public méthode

Returns the list of notebooks shared to the user through the business account
public getBusinessLinkedNotebooks ( ) : array
Résultat array

getBusinessNoteStore() public méthode

Returns the business notestore
public getBusinessNoteStore ( ) : EDAM\NoteStore\NoteStoreClient | mixed
Résultat EDAM\NoteStore\NoteStoreClient | mixed

getBusinessSharedNotebooks() public méthode

Returns the list of notebooks shared by the user with her business account
public getBusinessSharedNotebooks ( ) : null
Résultat null

getBusinessToken() public méthode

Returns the token used to access the business notestore
public getBusinessToken ( ) : string
Résultat string

getChina() public méthode

Gets the current china flag
public getChina ( ) : boolean
Résultat boolean

getNote() public méthode

Retrieves an existing note
public getNote ( $guid, null $scope = null ) : Evernote\Model\Note | null
$guid
$scope null
Résultat Evernote\Model\Note | null

getNoteBookByLinkedNotebook() protected méthode

protected getNoteBookByLinkedNotebook ( EDAM\Types\LinkedNotebook $linkedNotebook )
$linkedNotebook EDAM\Types\LinkedNotebook

getNoteInstance() protected méthode

protected getNoteInstance ( EDAM\Types\Note $edamNote = null, $noteStore = null, $token = null )
$edamNote EDAM\Types\Note

getNoteStore() protected méthode

************************
protected getNoteStore ( $noteStoreUrl )

getNotebook() public méthode

Retrieves a notebook
public getNotebook ( $notebook_guid, null $scope = null ) : Evernote\Model\Notebook | null
$notebook_guid
$scope null
Résultat Evernote\Model\Notebook | null

getSandbox() public méthode

Gets the current sandbox flag
public getSandbox ( ) : boolean
Résultat boolean

getShardIdFromToken() protected méthode

protected getShardIdFromToken ( $token )

getShareUrl() protected méthode

protected getShareUrl ( $guid, $shardId, $shareKey, $serviceHost )

getSharedNotebookAuthResult() protected méthode

protected getSharedNotebookAuthResult ( EDAM\Types\LinkedNotebook $linkedNotebook )
$linkedNotebook EDAM\Types\LinkedNotebook

getToken() public méthode

Returns the current authentication token
public getToken ( ) : string
Résultat string

getUserNotestore() public méthode

Returns the personal notestore of the user
public getUserNotestore ( ) : EDAM\NoteStore\NoteStoreClient | mixed
Résultat EDAM\NoteStore\NoteStoreClient | mixed

isAppNotebookToken() public méthode

Checks if the token is an "app notebook" one
public isAppNotebookToken ( $token ) : boolean
$token
Résultat boolean

isBusinessUser() public méthode

Returns a boolean indicating if the user has a business account
public isBusinessUser ( ) : boolean
Résultat boolean

isFlagSet() protected méthode

protected isFlagSet ( $flags, $flag )

listLinkedNotebooks() public méthode

Returns the list of notebooks shared to the user
public listLinkedNotebooks ( ) : array
Résultat array

listNotebooks() public méthode

Returns the list of notebooks
public listNotebooks ( ) : array
Résultat array

listPersonalNotebooks() public méthode

Returns the list of personal notebooks
public listPersonalNotebooks ( ) : array
Résultat array

listSharedNotebooks() public méthode

Returns the list of notebooks shared by the user
public listSharedNotebooks ( ) : array
Résultat array

moveNote() public méthode

Moves a note to another notebook
public moveNote ( Evernote\Model\Note $note, Evernote\Model\Notebook $notebook ) : Evernote\Model\Note
$note Evernote\Model\Note
$notebook Evernote\Model\Notebook
Résultat Evernote\Model\Note

replaceNote() public méthode

Replaces an existing note by another one (new or existing)
public replaceNote ( Evernote\Model\Note $noteToReplace, Evernote\Model\Note $note ) : Evernote\Model\Note
$noteToReplace Evernote\Model\Note
$note Evernote\Model\Note
Résultat Evernote\Model\Note

setAdvancedClient() public méthode

Sets the advancedClient
public setAdvancedClient ( Evernote\AdvancedClient $advancedClient )
$advancedClient Evernote\AdvancedClient

setChina() public méthode

Sets the china flag to true or false
public setChina ( boolean $china )
$china boolean

setSandbox() public méthode

Sets the sandbox flag to true or false
public setSandbox ( boolean $sandbox )
$sandbox boolean

setToken() public méthode

Sets the authentication token
public setToken ( string $token )
$token string

shareNote() public méthode

Shares a note and returns the share url
public shareNote ( Evernote\Model\Note $note ) : null | string
$note Evernote\Model\Note
Résultat null | string

uploadNote() public méthode

Sends a new Note to the API
public uploadNote ( Evernote\Model\Note $note, Evernote\Model\Notebook $notebook = null ) : Evernote\Model\Note
$note Evernote\Model\Note
$notebook Evernote\Model\Notebook
Résultat Evernote\Model\Note

Property Details

$advancedClient protected_oe property

protected AdvancedClient,Evernote $advancedClient
Résultat Evernote\AdvancedClient

$businessAuth protected_oe property

protected AuthenticationResult,EDAM\UserStore $businessAuth
Résultat EDAM\UserStore\AuthenticationResult

$businessNoteStore protected_oe property

protected NoteStoreClient,EDAM\NoteStore $businessNoteStore
Résultat EDAM\NoteStore\NoteStoreClient

$businessToken protected_oe property

protected string $businessToken
Résultat string

$china protected_oe property

protected bool $china
Résultat boolean

$isBusinessUser protected_oe property

protected $isBusinessUser

$logger protected_oe property

protected LoggerInterface,Psr\Log $logger
Résultat Psr\Log\LoggerInterface

$sandbox protected_oe property

protected bool $sandbox
Résultat boolean

$token protected_oe property

protected string $token
Résultat string

$userNoteStore protected_oe property

protected NoteStoreClient,EDAM\NoteStore $userNoteStore
Résultat EDAM\NoteStore\NoteStoreClient