listFeeds()
listFeeds() : array
Get a list of stored channels.
Returns
array —An array of channels
Jonah external API interface.
This file defines Jonah's external API interface. Other applications can interact with Jonah through this API.
Copyright 2002-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (BSD). If you did not did not receive this file, see http://cvs.horde.org/co.php/jonah/LICENSE.
stories(integer $channel_id, array $filter = array()) : array
Return the requested stories
integer | $channel_id | The channel to get the stories from. |
array | $filter | Additional, optional filters. max_stories The maximum number of stories to get. start_at The story number to start retrieving. order How to order the results. |
An array of story information
story(integer $channel_id, integer $story_id, boolean $read = true) : array
Fetches a story from a requested channel.
integer | $channel_id | The channel id to fetch. |
integer | $story_id | The story id to fetch. |
boolean | $read | Whether to update the read count. |
An array of story data
publish(integer $channel_id, array $story)
Publish a new story
integer | $channel_id | The channel id |
array | $story | The story array. Can contain: (string)title [REQUIRED] The story title. (string)description [REQUIRED] The short description. (string)body_type [OPTIONAL] The body type (text/html). (string)body [OPTIONAL] The story body. (string)url [OPTIONAL] The url for the story link. (array)tags [OPTIONAL] Tags |
listTagInfo(array $tags = array(), array $channel_id = 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.@deprecated and currently ignored. |
array | $channel_id | An optional array of channel_ids. @todo - only the first requested channel is honored. |
An array containing tag_name, and total
searchTags(array $names, array $filter = array(), boolean $raw = false) : \An
Searches internal channels for stories tagged with all requested tags.
Returns an application-agnostic array (useful for when doing a tag search across multiple applications).
The 'raw' story array can be returned instead by setting $raw = true.
array | $names | An array of tag_names to search for (AND'd together). |
array | $filter | An array of optional filter parameters. max The maximum number of stories to return. from The number of the story to start with. channel_id (integer) A channel_id to restrict to. order How to order the results (a Jonah::ORDER_* constant) |
boolean | $raw | Return the raw story data? |
array of results with the following structure:
'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.