File/lib/api.php

Description

Whups external API interface.

This file defines Whups' external API interface. Other applications can interact with Whups through this API.

$Horde: whups/lib/api.php,v 1.148.2.2 2009/09/07 10:09:11 jan Exp $

Functions
_whups_add (line 222)

Create a new queue.

  • return: The new queue id.
integer _whups_add (string $name)
  • string $name: The queue's name.
_whups_addAttachment (line 488)

Adds an attachment to a ticket.

  • return: True on success or PEAR_Error on failure.
mixed _whups_addAttachment (integer $ticket_id, string $name, string $data)
  • integer $ticket_id: The ticket number.
  • string $name: The name of the attachment.
  • string $data: The attachment data.
_whups_addComment (line 443)

Add a comment to a ticket.

  • return: True
boolean _whups_addComment (integer $ticket_id, string $comment, [string $group = null])
  • integer $ticket_id: The id of the ticket to comment on.
  • string $comment: The comment text to add.
  • string $group: (optional) Restrict this comment to a specific group.
_whups_addTicket (line 287)

Create a new ticket.

  • return: The new ticket id.
integer _whups_addTicket (array $ticket_info)
  • array $ticket_info: An array of form variables representing all of the data collected by CreateStep1Form, CreateStep2Form, CreateStep3Form, and optionally CreateStep4Form.
_whups_addVersion (line 694)

Add a version to a queue

void _whups_addVersion (integer $queue, string $name, string $description)
  • integer $queue: The queue id
  • string $name: The version name
  • string $description: The version description
_whups_browse (line 150)

Browse through Whups' object tree.

  • return: The contents of $path
array _whups_browse ([string $path = ''])
  • string $path: The level of the tree to browse.
_whups_getAssignedTicketIds (line 237)

Return the ids of all open tickets assigned to the current user.

  • return: Array of ticket ids.
array _whups_getAssignedTicketIds ()
_whups_getListTypes (line 564)

Get the types that Whups items can be listed as.

  • return: Array of list types.
array _whups_getListTypes ()
_whups_getQueueDetails (line 637)

Get details for a queue

  • return: An array of queue information (or an array of arrays, if multiple queues were passed).
array _whups_getQueueDetails (array $queue)
  • array $queue: | integer $queue Either an array of queue ids or a single queue id.
_whups_getRequestedTicketIds (line 260)

Return the ids of all open tickets that the current user created.

  • return: Array of ticket ids.
array _whups_getRequestedTicketIds ()
_whups_getTicketDetails (line 721)

Get the all tickets for a queue, optionally with a specific state.

  • return: Array of tickets
array _whups_getTicketDetails (integer $queue_id, [string $state = null])
  • integer $queue_id: The queue to get tickets for
  • string $state: The state filter, if any.
_whups_getVersionDetails (line 707)

Return the details for a queue version

  • return: Array of version details
array _whups_getVersionDetails (integer $version_id)
  • integer $version_id: The version to fetch
_whups_list (line 209)

Get a list of queues that the current user has read permissions for.

  • return: Queue list
array _whups_list ()
_whups_listAs (line 576)

Get a list of items from whups as type $type.

  • return: An array of tickets.
array _whups_listAs (string $type)
  • string $type: The list type to use (@see getListTypes). Currently supported: 'taskHash'
_whups_listCostObjects (line 827)

List cost objects

  • return: Tickets (as cost objects) matching $criteria
array _whups_listCostObjects (array $criteria)
  • array $criteria: The list criteria
_whups_listQueues (line 624)

Return a list of queues that the current user has read permissions for

  • return: Array of queue details
array _whups_listQueues ()
_whups_listTimeObjectCategories (line 882)

List the ways that tickets can be treated as time objects

  • return: Array of time object types
array _whups_listTimeObjectCategories ()
_whups_listTimeObjects (line 897)

Lists tickets with due dates as time objects.

void _whups_listTimeObjects (array $categories, mixed $start, mixed $end)
  • array $categories: The time categories (from listTimeObjectCategories) to list.
  • mixed $start: The start date of the period.
  • mixed $end: The end date of the period.
_whups_listVersions (line 664)

List the versions associated with a queue

  • return: Array of queue versions
array _whups_listVersions (integer $queue)
  • integer $queue: The queue id to get versions for.
_whups_perms (line 764)

Permissions available from Whups

  • return: Permissions tree
array _whups_perms ()
_whups_setTicketAttributes (line 527)

Set attributes for a ticket

  • TODO: fold this into the updateTicket method
void _whups_setTicketAttributes ( $info)
  • $info
_whups_updateTicket (line 356)

Update a ticket's properties.

  • return: True
boolean _whups_updateTicket (integer $ticket_id, array $ticket_info)
  • integer $ticket_id: The id of the id to changes.
  • array $ticket_info: The attributes to set, from the EditTicketForm.

Documentation generated on Sun, 30 Jan 2011 05:41:40 +0000 by phpDocumentor 1.4.3