PHP Класс Evernote\Client

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
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 )

Описание методов

__construct() публичный Метод

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 compareByCreated ( $obj1, $obj2 )

compareByTitle() защищенный Метод

protected compareByTitle ( $obj1, $obj2 )

compareByUpdated() защищенный Метод

protected compareByUpdated ( $obj1, $obj2 )

deleteNote() публичный Метод

Deletes a note
public deleteNote ( Evernote\Model\Note $note ) : boolean
$note Evernote\Model\Note
Результат boolean

findNotesWithSearch() публичный Метод

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
Результат array | boolean

findNotes_findInBusinessScopeWithContext() защищенный Метод

findNotes_findInLinkedScopeWithContext() защищенный Метод

findNotes_findInPersonalScopeWithContext() защищенный Метод

findNotes_listNotebooksWithContext() защищенный Метод

protected findNotes_listNotebooksWithContext ( $context )

findNotes_nextFindInLinkedScopeWithContext() защищенный Метод

findNotes_processResultsWithContext() защищенный Метод

protected findNotes_processResultsWithContext ( $context )

getAdvancedClient() публичный Метод

Returns the advancedClient
public getAdvancedClient ( ) : Evernote\AdvancedClient
Результат Evernote\AdvancedClient

getBusinessAuth() защищенный Метод

protected getBusinessAuth ( ) : EDAM\UserStore\AuthenticationResult
Результат EDAM\UserStore\AuthenticationResult

getBusinessLinkedNotebooks() публичный Метод

Returns the list of notebooks shared to the user through the business account
public getBusinessLinkedNotebooks ( ) : array
Результат array

getBusinessNoteStore() публичный Метод

Returns the business notestore
public getBusinessNoteStore ( ) : EDAM\NoteStore\NoteStoreClient | mixed
Результат EDAM\NoteStore\NoteStoreClient | mixed

getBusinessSharedNotebooks() публичный Метод

Returns the list of notebooks shared by the user with her business account
public getBusinessSharedNotebooks ( ) : null
Результат null

getBusinessToken() публичный Метод

Returns the token used to access the business notestore
public getBusinessToken ( ) : string
Результат string

getChina() публичный Метод

Gets the current china flag
public getChina ( ) : boolean
Результат boolean

getNote() публичный Метод

Retrieves an existing note
public getNote ( $guid, null $scope = null ) : Evernote\Model\Note | null
$guid
$scope null
Результат Evernote\Model\Note | null

getNoteBookByLinkedNotebook() защищенный Метод

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

getNoteInstance() защищенный Метод

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

getNoteStore() защищенный Метод

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

getNotebook() публичный Метод

Retrieves a notebook
public getNotebook ( $notebook_guid, null $scope = null ) : Evernote\Model\Notebook | null
$notebook_guid
$scope null
Результат Evernote\Model\Notebook | null

getSandbox() публичный Метод

Gets the current sandbox flag
public getSandbox ( ) : boolean
Результат boolean

getShardIdFromToken() защищенный Метод

protected getShardIdFromToken ( $token )

getShareUrl() защищенный Метод

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

getSharedNotebookAuthResult() защищенный Метод

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

getToken() публичный Метод

Returns the current authentication token
public getToken ( ) : string
Результат string

getUserNotestore() публичный Метод

Returns the personal notestore of the user
public getUserNotestore ( ) : EDAM\NoteStore\NoteStoreClient | mixed
Результат EDAM\NoteStore\NoteStoreClient | mixed

isAppNotebookToken() публичный Метод

Checks if the token is an "app notebook" one
public isAppNotebookToken ( $token ) : boolean
$token
Результат boolean

isBusinessUser() публичный Метод

Returns a boolean indicating if the user has a business account
public isBusinessUser ( ) : boolean
Результат boolean

isFlagSet() защищенный Метод

protected isFlagSet ( $flags, $flag )

listLinkedNotebooks() публичный Метод

Returns the list of notebooks shared to the user
public listLinkedNotebooks ( ) : array
Результат array

listNotebooks() публичный Метод

Returns the list of notebooks
public listNotebooks ( ) : array
Результат array

listPersonalNotebooks() публичный Метод

Returns the list of personal notebooks
public listPersonalNotebooks ( ) : array
Результат array

listSharedNotebooks() публичный Метод

Returns the list of notebooks shared by the user
public listSharedNotebooks ( ) : array
Результат array

moveNote() публичный Метод

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
Результат Evernote\Model\Note

replaceNote() публичный Метод

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
Результат Evernote\Model\Note

setAdvancedClient() публичный Метод

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

setChina() публичный Метод

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

setSandbox() публичный Метод

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

setToken() публичный Метод

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

shareNote() публичный Метод

Shares a note and returns the share url
public shareNote ( Evernote\Model\Note $note ) : null | string
$note Evernote\Model\Note
Результат null | string

uploadNote() публичный Метод

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
Результат Evernote\Model\Note

Описание свойств

$advancedClient защищенное свойство

protected AdvancedClient,Evernote $advancedClient
Результат Evernote\AdvancedClient

$businessAuth защищенное свойство

protected AuthenticationResult,EDAM\UserStore $businessAuth
Результат EDAM\UserStore\AuthenticationResult

$businessNoteStore защищенное свойство

protected NoteStoreClient,EDAM\NoteStore $businessNoteStore
Результат EDAM\NoteStore\NoteStoreClient

$businessToken защищенное свойство

protected string $businessToken
Результат string

$china защищенное свойство

protected bool $china
Результат boolean

$isBusinessUser защищенное свойство

protected $isBusinessUser

$logger защищенное свойство

protected LoggerInterface,Psr\Log $logger
Результат Psr\Log\LoggerInterface

$sandbox защищенное свойство

protected bool $sandbox
Результат boolean

$token защищенное свойство

protected string $token
Результат string

$userNoteStore защищенное свойство

protected NoteStoreClient,EDAM\NoteStore $userNoteStore
Результат EDAM\NoteStore\NoteStoreClient