Skip to content

Latest commit

 

History

History
executable file
·
271 lines (192 loc) · 9.29 KB

TaskCategoriesApi.md

File metadata and controls

executable file
·
271 lines (192 loc) · 9.29 KB

Swagger\Client\TaskCategoriesApi

All URIs are relative to https://api.insightly.com/v3.0

Method HTTP request Description
addTaskCategory POST /TaskCategories Adds a Task Category
deleteTaskCategory DELETE /TaskCategories/{id} Deactivates a Task Category
getTaskCategories GET /TaskCategories Gets a list of Task Categories
getTaskCategory GET /TaskCategories/{id} Gets a Task Category
updateTaskCategory PUT /TaskCategories Updates a Task Category

addTaskCategory

\Swagger\Client\Model\Category addTaskCategory($category, $authorization)

Adds a Task Category

This endpoint is used to create a new task category. This endpoint is only accessible to users with administrator permission.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Swagger\Client\Api\TaskCategoriesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$category = new \Swagger\Client\Model\APICategory(); // \Swagger\Client\Model\APICategory | The Task Category to add (just include JSON object as request body)
$authorization = "{{Authorization}}"; // string | Authorization

try {
    $result = $apiInstance->addTaskCategory($category, $authorization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TaskCategoriesApi->addTaskCategory: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
category \Swagger\Client\Model\APICategory The Task Category to add (just include JSON object as request body)
authorization string Authorization [default to {{Authorization}}]

Return type

\Swagger\Client\Model\Category

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteTaskCategory

deleteTaskCategory($id, $authorization)

Deactivates a Task Category

This endpoint is used to deactivate a task category. This endpoint is only accessible to users with administrator permission.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Swagger\Client\Api\TaskCategoriesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$id = 789; // int | A Task Category's ID
$authorization = "{{Authorization}}"; // string | Authorization

try {
    $apiInstance->deleteTaskCategory($id, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling TaskCategoriesApi->deleteTaskCategory: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int A Task Category's ID
authorization string Authorization [default to {{Authorization}}]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTaskCategories

object[] getTaskCategories($authorization, $skip, $top, $count_total)

Gets a list of Task Categories

This read only endpoint returns a list of the task categories set up for the Insightly instance.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Swagger\Client\Api\TaskCategoriesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$authorization = "{{Authorization}}"; // string | Authorization
$skip = 56; // int | Optional, number of records to skip.
$top = 56; // int | Optional, maximum number of records to return in the response.
$count_total = false; // bool | Optional, true if total number of records should be returned in the response headers.

try {
    $result = $apiInstance->getTaskCategories($authorization, $skip, $top, $count_total);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TaskCategoriesApi->getTaskCategories: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
authorization string Authorization [default to {{Authorization}}]
skip int Optional, number of records to skip. [optional]
top int Optional, maximum number of records to return in the response. [optional]
count_total bool Optional, true if total number of records should be returned in the response headers. [optional] [default to false]

Return type

object[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTaskCategory

\Swagger\Client\Model\Category getTaskCategory($id, $authorization)

Gets a Task Category

This endpoint returns the graph for a specific task category.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Swagger\Client\Api\TaskCategoriesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$id = 789; // int | A Task Category's ID
$authorization = "{{Authorization}}"; // string | Authorization

try {
    $result = $apiInstance->getTaskCategory($id, $authorization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TaskCategoriesApi->getTaskCategory: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int A Task Category's ID
authorization string Authorization [default to {{Authorization}}]

Return type

\Swagger\Client\Model\Category

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateTaskCategory

\Swagger\Client\Model\Category updateTaskCategory($category, $authorization)

Updates a Task Category

This endpoint is used to update an existing task category, for example to change the background color for the task category's label in the web UI. This endpoint is only accessible to users with administrator permission.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Swagger\Client\Api\TaskCategoriesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$category = new \Swagger\Client\Model\APICategory(); // \Swagger\Client\Model\APICategory | A Task Category (just include JSON object as request body)
$authorization = "{{Authorization}}"; // string | Authorization

try {
    $result = $apiInstance->updateTaskCategory($category, $authorization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TaskCategoriesApi->updateTaskCategory: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
category \Swagger\Client\Model\APICategory A Task Category (just include JSON object as request body)
authorization string Authorization [default to {{Authorization}}]

Return type

\Swagger\Client\Model\Category

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]