Favro PHP Api
, (*1)
, (*2)
Dependencies
Library requires CURL extension and PHP 5.6 or above., (*3)
Installation
The recommended way to install this library is via Composer.
New to Composer?, (*4)
composer require seregazhuk/favro-api
Quick Start
First of all you need to select your current organization, because nearly all
API requests require the organizationId of the organization that these call are being
made against. You can set your current organization in two ways: by name or by Id., (*5)
// You may need to amend this path to locate composer's autoloader
require './vendor/autoload.php';
use seregazhuk\Favro\Favro;
$favro = Favro::create('test@example.com', 'test');
// set your organization
$favro->useOrganization("My Organization");
// get all collections
$result = $favro->collections->getAll();
You can get all your organization and then set it by id:, (*6)
// get your organizations
$result = $favro->organizations->getAll();
$organizations = $result['entities'];
// select the first organization
$favro->useOrganization($organizations[0]['organizationId']);
Rate limiting
To get your current rate limit information use getRateInfo() method:, (*7)
$result = $favro->getRateInfo();
print_r($result);
/*
[
'reset' => 2016-09-03T08:17:24.158Z
'remaining' => 42
'limit' => 50
]
*/
Result will be an array of three elements:, (*8)
Key |
Description |
reset |
The time at which the current rate limit window resets in UTC. |
remaining |
The number of requests remaining in the current rate limit window. |
limit |
The maximum number of requests permitted to make per hour. |
More information about rate limiting is available in the official api docs., (*9)
Users
$result = $favro->users->getAll();
The response will be an array of users:, (*10)
[
"limit": 100,
"page": 0,
"pages": 1,
"requestId": "8cc57b1d8a218fa639c8a0fa",
"entities": [
[
"userId": "67973f72db34592d8fc96c48",
"name": "Favro user",
"email": "user@favro.com"
]
]
]
Arguments:, (*11)
Argument |
Type |
Description |
userId |
string |
The id of the user to be retrieved. |
$result = $favro->users->getById($userId);
The response returns a user object:, (*12)
[
"userId": "67973f72db34592d8fc96c48",
"name": "Favro user",
"email": "user@favro.com"
]
Organizations
$result = $favro->organizations->getAll();
The response will be an array of organizations:, (*13)
[
"limit": 100,
"page": 0,
"pages": 1,
"requestId": "8cc57b1d8a218fa639c8a0fa",
"entities": [
[
"organizationId" : "67973f72db34592d8fc96c48",
"name" : "My organization",
"sharedToUsers": [
[
"userId" : "fB6bJr5TbaKLiofns",
"role" : "administrator",
"joinDate" : "2016-02-10T14:25:58.745Z"
]
]
]
]
]
Arguments:, (*14)
Argument |
Type |
Description |
organizationId |
string |
The id of the organization to be retrieved. |
$result = $favro->organizations->getById($ogranizationId);
The response returns an organization object:, (*15)
[
"organizationId" : "67973f72db34592d8fc96c48",
"name" : "My organization",
"sharedToUsers": [
[
"userId" : "fB6bJr5TbaKLiofns",
"role" : "administrator",
"joinDate" : "2016-02-10T14:25:58.745Z"
]
]
]
Argument $attributes
is an array and contains the following values:, (*16)
Index |
Type |
Description |
name |
string |
The name of the organization. |
shareToUsers |
array |
The users who will be invited to the organization. See below for a description of a user share object. |
shareToUsers
is also an array with the following structure:, (*17)
Index |
Type |
Description |
userId |
string |
The userId of the existing user. Required if email is not provided. |
email |
string |
Email. Required if userId is not provided. |
role |
string |
The role of the user in the organization. Refer to organization roles. Required. |
delete |
boolean |
Removes user from the organization if value equals to true. Optional. |
$result = $favro->organizations->create($attributes);
The response will be the created organization:, (*18)
[
"organizationId" : "67973f72db34592d8fc96c48",
"name" : "My organization",
"sharedToUsers": [
[
"userId" : "fB6bJr5TbaKLiofns",
"role" : "administrator",
"joinDate" : "2016-02-10T14:25:58.745Z"
]
]
]
Arguments:, (*19)
Argument |
Type |
Description |
organizationId |
string |
The id of the organization to update. |
attributes |
array |
Array of attributes to be updated. |
attributes
is an array with the following structure:, (*20)
Index |
Type |
Description |
name |
string |
The name of the organization. |
members |
array |
Update user roles in the organization. See below for a description of a user share object. |
shareToUsers |
array |
The users who will be invited to the organization. See below for a description of a user share object. |
shareToUsers
is also an array with the following structure:, (*21)
Index |
Type |
Description |
userId |
string |
The userId of the existing user. Required if email is not provided. |
email |
string |
Email. Required if userId is not provided. |
role |
string |
The role of the user in the organization. Refer to organization roles. Required. |
delete |
boolean |
Removes user from the organization if value equals to true. Optional. |
$result = $favro->organizations->update($organizationId, $attributes);
The response will be the updated organization:, (*22)
[
"organizationId" : "67973f72db34592d8fc96c48",
"name" : "My organization",
"sharedToUsers": [
[
"userId" : "fB6bJr5TbaKLiofns",
"role" : "administrator",
"joinDate" : "2016-02-10T14:25:58.745Z"
]
]
]
Collections
$result = $favro->collections->getAll();
The response will be a paginated list of collections:, (*23)
[
"limit": 100,
"page": 0,
"pages": 1,
"requestId": "8cc57b1d8a218fa639c8a0fa",
"entities": [
[
"collectionId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"name": "My collection",
"sharedToUsers": [
[
"userId": "ff440e8f358c08513a86c8d6",
"role": "admin"
]
],
"publicSharing": "users",
"background": "purple",
"archived": false,
"shareWidgetsByDefault": true
]
]
]
Arguments:, (*24)
Argument |
Type |
Description |
collectionId |
string |
The id of the collection to be retrieved. |
$result = $favro->collections->getById($collectionId);
The response returns a collection object:, (*25)
[
"collectionId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"name": "My collection",
"sharedToUsers": [
[
"userId": "ff440e8f358c08513a86c8d6",
"role": "admin"
]
],
"publicSharing": "users",
"background": "purple",
"archived": false,
"shareWidgetsByDefault": true
]
Argument $attributes
is an array and contains the following values:, (*26)
Index |
Type |
Description |
name |
string |
The name of the collection. Required. |
starPage |
boolean |
Star the collection for authorized user. Defaults to false. |
shareWidgetsByDefault |
boolean |
Share widgets to the collection members by default. Defaults to true. |
publicSharing |
string |
Public share role for the collection. Refer to collection public sharing. |
background |
string |
The background color of the collection. Refer to collection background. |
shareToUsers |
array |
The users who will be invited to the collection. See below for a description of a user share object. |
shareToUsers
is also an array with the following structure:, (*27)
Index |
Type |
Description |
userId |
string |
The userId of the existing user. Required if email is not provided. |
email |
string |
Email. Required if userId is not provided. |
role |
string |
The role of the user in the collection. Refer to collection roles. Required. |
delete |
boolean |
Removes user from the collection if value equals to true. Optional. |
$result = $favro->collections->create($attributes);
The response will be the created collection:, (*28)
[
"collectionId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"name": "My collection",
"sharedToUsers": [
[
"userId": "ff440e8f358c08513a86c8d6",
"role": "admin"
]
],
"publicSharing": "users",
"background": "purple",
"archived": false,
"shareWidgetsByDefault": true
]
Arguments:, (*29)
Argument |
Type |
Description |
collectionId |
string |
The id of the collection to update. |
attributes |
array |
Array of attributes to be updated. |
attributes
is an array with the following structure:, (*30)
Index |
Type |
Description |
name |
string |
The name of the collection. Required. |
starPage |
boolean |
Star the collection for authorized user. Defaults to false. |
shareWidgetsByDefault |
boolean |
Share widgets to the collection members by default. Defaults to true. |
publicSharing |
string |
Public share role for the collection. Refer to collection public sharing. |
background |
string |
The background color of the collection. Refer to collection background. |
shareToUsers |
array |
The users who will be invited to the collection. See below for a description of a user share object. |
shareToUsers
is also an array with the following structure:, (*31)
Index |
Type |
Description |
userId |
string |
The userId of the existing user. Required if email is not provided. |
email |
string |
Email. Required if userId is not provided. |
role |
string |
The role of the user in the collection. Refer to collection roles. Required. |
delete |
boolean |
Removes user from the collection if value equals to true. Optional. |
$result = $favro->collections->update($collectionId, $attributes);
The response will be the updated collection:, (*32)
[
"collectionId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"name": "My collection",
"sharedToUsers": [
[
"userId": "ff440e8f358c08513a86c8d6",
"role": "admin"
]
],
"publicSharing": "users",
"background": "purple",
"archived": false,
"shareWidgetsByDefault": true
]
Arguments:, (*33)
Argument |
Type |
Description |
collectionId |
string |
The id of the collection to be deleted. |
$result = $favro->collections->delete($collectionId);
Arguments:, (*34)
Argument |
Type |
Description |
collectionId |
string |
The id of the collection to filter by. Optional. |
includePublic |
boolean |
Include publicly shared widgets. Defaults to false. |
$result = $favro->widgets->getAll();
The response will be a paginated array of widgets:, (*35)
[
"limit": 100,
"page": 0,
"pages": 1,
"requestId": "8cc57b1d8a218fa639c8a0fa",
"entities": [
[
"widgetCommonId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"collectionIds": [
"8cc57b1d8a218fa639c8a0fa"
],
"name": "This is a widget",
"type": "board",
"publicSharing": "collection",
"color": "purple",
"sharedToUsers": [
[
"userId": "tXfWe3MXQqhnnTRtw",
"role": "view"
]
]
]
]
]
Arguments:, (*36)
Argument |
Type |
Description |
widgetCommonId |
string |
The id of the widget to be retrieved. |
$result = $favro->widgets->getById($widgetCommonId);
The response returns a widget object:, (*37)
[
"widgetCommonId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"collectionIds": [
"8cc57b1d8a218fa639c8a0fa"
],
"name": "This is a widget",
"type": "board",
"publicSharing": "collection",
"color": "purple",
"sharedToUsers": [
[
"userId": "tXfWe3MXQqhnnTRtw",
"role": "view"
]
]
]
Create a widget, (*38)
Argument $attributes
is an array and contains the following values:, (*39)
Index |
Type |
Description |
collectionId |
string |
The collectionId of the collection to create the widget in. Required. |
name |
string |
The name of the widget. Required. |
type |
string |
The type of widget to create. Refer to widget types. Required. |
color |
string |
The color of the widget icon. Refer to widget colors. |
publicSharing |
string |
The public sharing level of the widget. Refer to widget public sharing. |
shareToUsers |
array |
The list of users to share the widget to. See below for a description of a user share object. |
shareToUsers
is also an array with the following structure:, (*40)
Index |
Type |
Description |
userId |
string |
The userId of the existing user. Required if email is not provided. |
email |
string |
Email. Required if userId is not provided. |
role |
string |
The role of the user on the widget. Refer to widget roles. Required. |
delete |
boolean |
Removes user from the widget if value equals to true. Optional. |
$result = $favro->widgets->create($attributes);
The response will be the created widget:, (*41)
[
"widgetCommonId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"collectionIds": [
"8cc57b1d8a218fa639c8a0fa"
],
"name": "This is a widget",
"type": "board",
"publicSharing": "collection",
"color": "purple",
"sharedToUsers": [
[
"userId": "tXfWe3MXQqhnnTRtw",
"role": "view"
]
]
]
Arguments:, (*42)
Argument |
Type |
Description |
widgetCommonId |
string |
The common id of the widget to update. Required |
attributes |
array |
Array of attributes to be updated. |
attributes
is an array with the following structure:, (*43)
Index |
Type |
Description |
name |
string |
The name of the widget. Required. |
archive |
boolean |
Archive or unarchive widget. Requires collectionId to be specified in the request. |
collectionId |
string |
The id of the collection where widget will be archived. Required if archive is included in the request. |
color |
string |
The color of widget label. Look at widget colors. |
publicSharing |
number |
The public sharing level of the widget. Refer to widget public sharing. |
members |
array |
Update user roles on the widget. See below for a description of a user share object. |
shareToUsers |
array |
The list of users to share the widget to. See below for a description of a user share object. |
shareToUsers
is also an array with the following structure:, (*44)
Index |
Type |
Description |
userId |
string |
The userId of the existing user. Required if email is not provided. |
email |
string |
Email. Required if userId is not provided. |
role |
string |
The role of the user on the widget. Refer to widget roles. Required. |
delete |
boolean |
Removes user from the widget if value equals to true. Optional. |
$result = $favro->widgets->update($widgetCommonId, $attributes);
The response will be the updated widget:, (*45)
[
"widgetCommonId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"collectionIds": [
"8cc57b1d8a218fa639c8a0fa"
],
"name": "This is a widget",
"type": "board",
"publicSharing": "collection",
"color": "purple",
"sharedToUsers": [
[
"userId": "tXfWe3MXQqhnnTRtw",
"role": "view"
]
]
]
Arguments:, (*46)
Argument |
Type |
Description |
widgetCommonId |
string |
The common id of the widget to be deleted. Required. |
collectionId |
string |
The id of collection where widget will be deleted. Optional. If ommitted all instances of the widget will be deleted. |
$favro->widgets->delete($widgetCommonId);
// or
$favro->widgets->delete($widgetCommonId, $collectionId);
Columns
Arguments:, (*47)
Argument |
Type |
Description |
widgetCommonId |
string |
The common id of the widget to filter by. Required. |
$result = $favro->columns->getAll($widgetCommonId);
The response will be a paginated array of columns:, (*48)
[
"limit": 100,
"page": 0,
"pages": 1,
"requestId": "8cc57b1d8a218fa639c8a0fa",
"entities": [
[
"columnId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"widgetCommonId": "ff440e8f358c08513a86c8d6",
"name": "This is a column",
"position": 0
]
]
]
Arguments:, (*49)
Argument |
Type |
Description |
columnId |
string |
The id of the column to be retrieved. |
$result = $favro->columns->getById($columnId);
The response returns a column object:, (*50)
[
"columnId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"widgetCommonId": "ff440e8f358c08513a86c8d6",
"name": "This is a column",
"position": 0
]
Argument $attributes
is an array and contains the following values:, (*51)
Index |
Type |
Description |
widgetCommonId |
string |
The widgetCommonId to create the column on. Required. |
name |
string |
The name of the column. Required. |
position |
string |
The position of the column on the widget. By default the column will be placed at the end of the widget. Optional. |
$result = $favro->columns->create($attributes);
The response will be the created column:, (*52)
[
"columnId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"widgetCommonId": "ff440e8f358c08513a86c8d6",
"name": "This is a column",
"position": 0
]
Arguments:, (*53)
Argument |
Type |
Description |
columnId |
string |
The id of the column to update. |
attributes |
array |
Array of attributes to be updated. |
attributes
is an array with the following structure:, (*54)
Index |
Type |
Description |
name |
string |
The name of the column. |
position |
string |
The position of the column. |
$result = $favro->columns->update($columnId, $attributes);
The response will be the updated column:, (*55)
[
"columnId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"widgetCommonId": "ff440e8f358c08513a86c8d6",
"name": "This is a column",
"position": 0
]
Deleting a column will also delete any cards that exist within that column., (*56)
Arguments:, (*57)
Argument |
Type |
Description |
columnId |
string |
The id of the column to be deleted. Required. |
$result = $favro->columns->delete($columnId);
Cards
In order to use this endpoint you must specify either todoList or one of cardCommonId, widgetCommonId or collectionId., (*58)
Arguments:, (*59)
Argument |
Type |
Description |
todoList |
boolean |
Return cards from todolist only. Defaults to false. |
cardCommonId |
string |
The common id of the card to filter by. |
widgetCommonId |
string |
The common id of the widget to filter by. |
collectionId |
string |
The id of the collection to filter by. |
unique |
boolean |
If true, return unique cards only. Defaults to false. |
$result = $favro->cards->getAll($params);
The response will be a paginated array of cards:, (*60)
[
"limit": 100,
"page": 0,
"pages": 1,
"requestId": "8cc57b1d8a218fa639c8a0fa",
"entities": [
[
"cardId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"widgetCommonId": "ff440e8f358c08513a86c8d6",
"columnId": "b4d8c6283d9d58f9a39108e7",
"name": "This is a card"
]
]
]
Arguments:, (*61)
Argument |
Type |
Description |
cardId |
string |
The id of the card to be retrieved. Required. |
$result = $favro->cards->get($cardId);
The response returns a card object:, (*62)
[
"cardId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"widgetCommonId": "ff440e8f358c08513a86c8d6",
"columnId": "b4d8c6283d9d58f9a39108e7",
"name": "This is a card"
]
Argument $attributes
is an array and contains the following values:, (*63)
Index |
Type |
Description |
widgetCommonId |
string |
The widgetCommonId to create the card on. One of organizationId, widgetCommonId is required. If not set, the card will be created in the user’s todo list. |
laneId |
string |
The laneId to create the card in. This is only applicable if creating the card on a widget that has lanes enabled. Optional. |
columnId |
string |
The columnId to create the card in. It must belong to the widget specified in the widgetCommonId parameter. WidgetCommonId is required if this parameter is set. |
parentCardId |
string |
If creating a card on a backlog widget, it is possible to create this card as a child of the card specified by this parameter. Optional. |
name |
string |
The name of the card. Required. |
detailedDescription |
string |
The detailed description of the card. Supports formatting. |
assignmentIds |
array |
The list of assignments (array of userIds). Optional. |
tags |
array |
The list of tag names or card tags that will be added to card. If current tag is not exist in the organization, it will be created. |
tagIds |
array |
The list of tag IDs, that will be added to card. |
startDate |
string |
The start date of card. Format ISO-8601. |
dueDate |
string |
The due date of card. Format ISO-8601. |
tasklists |
array |
The list of card tasklists. |
$result = $favro->cards->create($attributes);
The response will be the created card:, (*64)
[
"cardId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"widgetCommonId": "ff440e8f358c08513a86c8d6",
"columnId": "b4d8c6283d9d58f9a39108e7",
"name": "This is a card"
]
Arguments:, (*65)
Argument |
Type |
Description |
cardId |
string |
The id of the card to update. Required. |
attributes |
array |
Array of attributes to be updated. |
attributes
is an array with the following structure:, (*66)
Index |
Type |
Description |
name |
string |
The name of the card. |
detailedDescription |
string |
The detailed description of the card. Supports formatting. |
widgetCommonId |
string |
The widgetCommonId to commit the card in. Optional. |
laneId |
string |
The laneId to commit the card in. This is only applicable if creating the card on a widget that has lanes enabled. Optional. |
columnId |
string |
The columnId to commit the card in. It must belong to the widget specified in the widgetCommonId parameter. Optional. |
parentCardId |
string |
If commiting a card on a backlog widget, it is possible to create this card as a child of the card specified by this parameter. Optional. |
addAssignmentIds |
array |
The list of assignments, that will be added to card (array of userIds). Optional. |
removeAssignmentIds |
array |
The list of assignments, that will be removed from card (array of userIds). Optional. |
addTags |
array |
The list of tag names or card tags that will be added to the card. If the tag does not exist in the organization it will be created. |
addTagIds |
array |
A list of tagIds that will be added to card. |
removeTags |
array |
The list of tag names, that will be removed from card. |
removeTagIds |
array |
The list of tag IDs, that will be removed from card. |
startDate |
string |
The start date of card. Format ISO-8601. If null, start date will be removed. |
dueDate |
string |
The due date of card. Format ISO-8601. If null, due date will be removed. |
addTasklists |
array |
The list of card tasklists, that will be added to card. |
$result = $favro->cards->update($cardId, $attributes);
The response will be the updated cards:, (*67)
[
"cardId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"widgetCommonId": "ff440e8f358c08513a86c8d6",
"columnId": "b4d8c6283d9d58f9a39108e7",
"name": "This is a card"
]
Arguments:, (*68)
Argument |
Type |
Description |
cardId |
string |
The id of card to be deleted. Required. |
everywhere |
boolean |
If true, all copies of card will be deleted too. Defaults to false. |
$result = $favro->cards->delete($cardId, $everyWhere);
The response returns an array of cardIds for the cards that were deleted., (*69)
[
"67973f72db34592d8fc96c48",
"67973f72db34592d8fc96c49",
"67973f72db34592d8fc96c50"
]
Arguments:, (*70)
Argument |
Type |
Description |
name |
string |
The name of the tag to filter by. Optional. |
color |
string |
The color of the tag to filter by. Optional. |
$result = $favro->tags->getAll($params);
The response will be a paginated array of tags:, (*71)
[
"limit": 100,
"page": 0,
"pages": 1,
"requestId": "8cc57b1d8a218fa639c8a0fa",
"entities": [
[
"tagId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"name": "My tag",
"color": "purple"
]
]
]
Argument |
Type |
Description |
tagId |
string |
The id of the tag to be retrieved. |
$result = $favro->tags->get($tagId);
The response returns a tag object:, (*72)
[
"tagId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"name": "My tag",
"color": "purple"
]
Argument $attributes
is an array and contains the following values:, (*73)
Index |
Type |
Description |
cardCommonId |
string |
The common id of the card to post the tag on. Required. |
name |
string |
The name of the tag. Required. |
color |
string |
The color of the tag. If not specified, color will be selected randomly. Refer to tag colors. |
$result = $favro->tags->create($attributes);
The response will be the created tag:, (*74)
[
"tagId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"name": "My tag",
"color": "purple"
]
Argument | Type | Description |
, (*75)
tagId|string|The id of the tag to update. |
attributes|array|Array of attributes to be updated. |
attributes
is an array with the following structure:, (*76)
Index |
Type |
Description |
name |
string |
The name of the tag to edit. Optional. |
color |
string |
The color of the tag to edit. Optional. Refer to tag colors. |
$result = $favro->tags->update($tagId, $attributes);
The response will be the updated tag:, (*77)
[
"tagId": "67973f72db34592d8fc96c48",
"organizationId": "zk4CJpg5uozhL4R2W",
"name": "My tag",
"color": "purple"
]
Arguments:, (*78)
Argument |
Type |
Description |
tagId |
string |
The id of the tag to be deleted. Required. |
$result = $favro->tags->delete($tagId);
Tasks
Arguments:, (*79)
Argument |
Type |
Description |
cardCommonId |
string |
The card common id to filter by. Required. |
taskListId |
string |
The task list id to filter by. Optional. |
$result = $favro->tasks->getAll($params);
The response will be a paginated array of card tasks:, (*80)
[ "limit": 100,
"page": 0,
"pages": 1,
"requestId": "8cc57b1d8a218fa639c8a0fa",
"entities": [
[
"taskId": "67973f72db34592d8fc96c48",
"taskListId": "8cc57b1d8a218fa639c8a0fa",
"organizationId": "zk4CJpg5uozhL4R2W",
"cardCommonId": "tXfWe3MXQqhnnTRtw",
"name": "This is a task",
"completed": false,
"position": 0
]
]
]
Argument |
Type |
Description |
taskId |
string |
The id of the task to be retrieved. |
$result = $favro->tasks->get($taskId);
The response returns a task object:, (*81)
[
"taskId": "67973f72db34592d8fc96c48",
"taskListId": "8cc57b1d8a218fa639c8a0fa",
"organizationId": "zk4CJpg5uozhL4R2W",
"cardCommonId": "tXfWe3MXQqhnnTRtw",
"name": "This is a task",
"completed": false,
"position": 0
]
Argument $attributes
is an array and contains the following values:, (*82)
Index |
Type |
Description |
taskListId |
string |
The task list id to post the task on. Required. |
name |
string |
The name of the task. Required. |
position |
number |
Task position in the task list. Optional. |
completed |
boolean |
Task completion state. Optional. |
$result = $favro->tasks->create($attributes);
The response will be the created task:, (*83)
[
"taskId": "67973f72db34592d8fc96c48",
"taskListId": "8cc57b1d8a218fa639c8a0fa",
"organizationId": "zk4CJpg5uozhL4R2W",
"cardCommonId": "tXfWe3MXQqhnnTRtw",
"name": "This is a task",
"completed": false,
"position": 0
]
Argument |
Type |
Description |
taskId |
string |
The id of the task to update. |
attributes |
array |
Array of attributes to be updated. |
attributes
is an array with the following structure:, (*84)
Index |
Type |
Description |
name |
string |
The name of the task to edit. Optional. |
position |
string |
Task position in the list. Optional. |
completed |
string |
Task completion state. Optional. |
$result = $favro->tasks->update($taskId, $attributes);
The response will be the updated task:, (*85)
[
"taskId": "67973f72db34592d8fc96c48",
"taskListId": "8cc57b1d8a218fa639c8a0fa",
"organizationId": "zk4CJpg5uozhL4R2W",
"cardCommonId": "tXfWe3MXQqhnnTRtw",
"name": "This is a task",
"completed": false,
"position": 0
]
Arguments:, (*86)
Argument |
Type |
Description |
taskId |
string |
The id of the task to be deleted. Required. |
$result = $favro->tasks->delete($taskId);
Tasklists
Arguments:, (*87)
Argument |
Type |
Description |
cardCommonId |
string |
The card common id to filter by. Required. |
$result = $favro->tasklists->getAll($cardCommonId);
The response will be a paginated array of card task lists:, (*88)
[
"limit": 100,
"page": 0,
"pages": 1,
"requestId": "8cc57b1d8a218fa639c8a0fa",
"entities": [
[
"taskListId": "8cc57b1d8a218fa639c8a0fa",
"organizationId": "zk4CJpg5uozhL4R2W",
"cardCommonId": "tXfWe3MXQqhnnTRtw",
"description": "This is a tasklist",
"position": 0
]
]
]
Argument |
Type |
Description |
taskListId |
string |
The id of the task list to be retrieved. |
$result = $favro->tasklists->get($taskListId);
The response returns a task list object:, (*89)
[
"taskListId": "8cc57b1d8a218fa639c8a0fa",
"organizationId": "zk4CJpg5uozhL4R2W",
"cardCommonId": "tXfWe3MXQqhnnTRtw",
"description": "This is a tasklist",
"position": 0
]
Argument $attributes
is an array and contains the following values:, (*90)
Index |
Type |
Description |
cardCommonId |
string |
The card common id to post the task list on. Required |
name |
string |
The name of the task list. Required. |
position |
string |
Task position of the task list. Optional. |
tasks |
array |
The list of card task. Optional. |
$result = $favro->tasklists->create($attributes);
The response will be the created task list:, (*91)
[
"taskListId": "8cc57b1d8a218fa639c8a0fa",
"organizationId": "zk4CJpg5uozhL4R2W",
"cardCommonId": "tXfWe3MXQqhnnTRtw",
"description": "This is a tasklist",
"position": 0
]
Argument |
Type |
Description |
taskId |
string |
The id of the task list to update. |
attributes |
array |
Array of attributes to be updated. |
attributes
is an array with the following structure:, (*92)
Index |
Type |
Description |
name |
string |
The name of the task list to edit. Optional. |
position |
number |
Task position of the task list. Optional. |
$result = $favro->tasklists->update($taskListId, $attributes);
The response will be the updated task:, (*93)
[
"taskListId": "8cc57b1d8a218fa639c8a0fa",
"organizationId": "zk4CJpg5uozhL4R2W",
"cardCommonId": "tXfWe3MXQqhnnTRtw",
"description": "This is a tasklist",
"position": 0
]
Arguments:, (*94)
Argument |
Type |
Description |
taskListId |
string |
The id of the task list to be deleted. Required. |
$result = $favro->tasklists->delete($taskListId);
Arguments:, (*95)
Argument |
Type |
Description |
cardCommonId |
string |
The card common id to filter by. Required. |
$result = $favro->comments->getAll($cardCommonId);
The response will be a paginated array of comments:, (*96)
"limit": 100,
"page": 0,
"pages": 1,
"requestId": "8cc57b1d8a218fa639c8a0fa",
"entities": [
[
"commentId": "67973f72db34592d8fc96c48",
"cardCommonId": "ff440e8f358c08513a86c8d6",
"organizationId": "zk4CJpg5uozhL4R2W",
"userId": "b4d8c6283d9d58f9a39108e7",
"comment": "This is a comment",
"created": "2016-04-18T11:18:42.901Z",
"lastUpdated": "2016-04-18T11:18:42.901Z"
]
]
Argument |
Type |
Description |
commentId |
string |
The id of the comment to be retrieved. |
$result = $favro->comments->get($commentId);
The response returns a comment object:, (*97)
[
"commentId": "67973f72db34592d8fc96c48",
"cardCommonId": "ff440e8f358c08513a86c8d6",
"organizationId": "zk4CJpg5uozhL4R2W",
"userId": "b4d8c6283d9d58f9a39108e7",
"comment": "This is a comment",
"created": "2016-04-18T11:18:42.901Z",
"lastUpdated": "2016-04-18T11:18:42.901Z"
]
How can I thank you?
Why not star the github repo? I'd love the attention!, (*98)
Thanks!, (*99)