RprtCli/app/src/Utils/TimeTrackingServices/YoutrackRestApi/YoutrackRestApiInterface.php

38 lines
839 B
PHP

<?php
declare(strict_types=1);
namespace RprtCli\Utils\TimeTrackingServices\YoutrackRestApi;
// use RprtCli\Utils\TimeTrackingServices\EntityDefinition;
/**
* Youtrack rest api interface.
*
*/
interface YoutrackRestApiInterface
{
/**
* Check if client can sign into youtrack with provided token.
*/
public function testYoutrackapi() : ?string;
/**
* Get the id of the report from configuration.
*
* @TODO more advanced use case with proper data objects.
*/
// public function getItem(string $id) : ?EntityDefinition;
// fields, filters
public function getItem(string $id): array;
/**
* Get a list of items.
*
*
* Array of reports with ids as keys and names as values.
*/
public function listItems(string $id, array $filters = []): array;
}