$_links
$_links : array
Links.
Mnemo external API interface.
This file defines Mnemo's external API interface. Other applications can interact with Mnemo through this API.
Copyright 2001-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (ASL). If you did not receive this file, see http://www.horde.org/licenses/apache.
listNotepads(boolean $owneronly, integer $permission) : array
boolean | $owneronly | Only return notepads that this user owns? Defaults to false. |
integer | $permission | The permission to filter notepads by. |
The notepads.
None found |
browse(string $path = '', array $properties = array()) : array
Browse through Mnemo's object tree.
string | $path | The level of the tree to browse. |
array | $properties | The item properties to return. Defaults to 'name', 'icon', and 'browseable'. |
The contents of $path
None found |
put(string $path, string $content, string $content_type) : array
Saves a file into the Mnemo tree.
string | $path | The path where to PUT the file. |
string | $content | The file content. |
string | $content_type | The file's content type. |
The note UIDs
None found |
path_delete(string $path) : string
Deletes a file from the Mnemo tree.
string | $path | The path to the file. |
The note's UID
None found |
listUids(array|string $notepads = null) : array
Returns an array of UIDs for all notes that the current user is authorized to see.
array|string | $notepads | The notepad(s) to list notes from. |
An array of UIDs for all notes the user can access.
None found |
getChanges(integer $start, integer $end, boolean $isModSeq = false, string $notepad = null) : array
Method for obtaining all server changes between two timestamps. Basically a wrapper around listBy(), but returns an array containing all adds, edits and deletions.
integer | $start | The starting timestamp |
integer | $end | The ending timestamp. |
boolean | $isModSeq | If true, $timestamp and $end are modification sequences and not timestamps. @since 4.1.1 |
string | $notepad | The source to check. @since 4.2.0 |
An hash with 'add', 'modify' and 'delete' arrays.
None found |
getChangesByModSeq(integer $start, integer $end, string $notepad = null) : array
Return all changes occuring between the specified modification sequences.
integer | $start | The starting modseq. |
integer | $end | The ending modseq. |
string | $notepad | The source to check. @since 4.2.0 |
The changes @see getChanges()
since | 4.1.1 |
---|
listBy(string $action, integer $timestamp, string $notepad = null, integer $end = null, boolean $isModSeq = false) : array
Returns an array of UIDs for notes that have had $action happen since $timestamp.
string | $action | The action to check for - add, modify, or delete. |
integer | $timestamp | The time to start the search. |
string | $notepad | The notepad to search in. |
integer | $end | The optional ending timestamp. |
boolean | $isModSeq | If true, $timestamp and $end are modification sequences and not timestamps. @since 4.1.1 |
An array of UIDs matching the action and time criteria.
None found |
getActionTimestamp(string $uid, string $action, string $notepad = null, boolean $modSeq = false) : integer
Returns the timestamp of an operation for a given uid an action.
string | $uid | The uid to look for. |
string | $action | The action to check for - add, modify, or delete. |
string | $notepad | The notepad to search in. |
boolean | $modSeq | Request a modification sequence instead of a timestamp. @since 4.1.1 |
The timestamp or modseq for this action.
None found |
getHighestModSeq(string $id = null) : integer
Return the largest modification sequence from the history backend.
string | $id | The notepad id to get the MODSEQ for. If null, the highest MODSEQ across all notepads is returned. @since 4.2.0 |
The modseq.
since | 4.1.1 |
---|
import(string $content, string $contentType, string $notepad = null) : string
Import a memo represented in the specified contentType.
string | $content | The content of the memo. |
string | $contentType | What format is the data in? Currently supports: text/plain text/x-vnote activesync |
string | $notepad | (optional) The notepad to save the memo on. |
The new UID, or false on failure.
None found |
export(string $uid, string $contentType, array $options = array()) : mixed
Export a memo, identified by UID, in the requested contentType.
string | $uid | Identify the memo to export. |
string | $contentType | What format should the data be in? A string with one of: 'text/plain' 'text/x-vnote' 'activesync' |
array | $options | Any additional options to be passed to the exporter. |
The requested data
None found |
delete( $uid)
Delete a memo identified by UID.
$uid |
None found |
replace(string $uid, string $content, string $contentType)
Replace the memo identified by UID with the content represented in the specified contentType.
string | $uid | Idenfity the memo to replace. |
string | $content | The content of the memo. |
string | $contentType | What format is the data in? Currently supports: text/plain text/x-vnote activesync |
None found |
sources(boolean $writeable = false, boolean $sync_only = false) : array
Returns a list of available sources.
boolean | $writeable | If true, limits to writeable sources. |
boolean | $sync_only | Only include synchable notepads. |
An array of the available sources. Keys are source IDs, values are source titles.
since | 4.2.0 |
---|
getDefaultShare() : string
Retrieve the UID for the current user's default notepad.
UID.
since | 4.2.0 |
---|
addNotepad(string $name, array $params = array()) : string
Create a new notepad.
string | $name | The notepad display name. |
array | $params | Any additional parameters needed.
|
The new notepad's id.
since | 4.2.0 |
---|
since | 4.2.0 |
---|
updateNotepad(string $id, array $info)
Update a notepad's title and/or description.
string | $id | The notepad id |
array | $info | The data to change:
|
since | 4.2.0 |
---|
listTagInfo(array $tags = null, $user = null) : array
Retrieve the list of used tag_names, tag_ids and the total number of resources that are linked to that tag.
array | $tags | An optional array of tag_ids. If omitted, all tags will be included. |
$user |
An array containing tag_name, and total
None found |
searchTags(array $names, integer $max = 10, integer $from, string $resource_type = '', string $user = null, boolean $raw = false) : array
SearchTags API: Returns an application-agnostic array (useful for when doing a tag search across multiple applications)
The 'raw' results array can be returned instead by setting $raw = true.
array | $names | An array of tag_names to search for. |
integer | $max | The maximum number of resources to return. |
integer | $from | The number of the resource to start with. |
string | $resource_type | The resource type [bookmark, ''] |
string | $user | Restrict results to resources owned by $user. |
boolean | $raw | Return the raw data? |
An array of results:
'title' - The title for this resource. 'desc' - A terse description of this resource. 'view_url' - The URL to view this resource. 'app' - The Horde application this resource belongs to. 'icon' - URL to an image.
None found |