2019-06-24 23:29:02 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* A very compact and simple Memsource API library
|
|
|
|
*
|
|
|
|
* @author Bruno Fontes <developer@brunofontes.net>
|
|
|
|
* @link https://github.com/brunofontes
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace BrunoFontes\Memsource;
|
|
|
|
|
|
|
|
class Jobs extends \BrunoFontes\Memsource\BaseApi
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* List jobs of a project
|
|
|
|
* The API request returns a MAX of 50 Jobs.
|
|
|
|
* To get more jobs you need to make more requests for next pages
|
|
|
|
*
|
|
|
|
* @param string $projectUid The project uid on which has the jobs to be shown
|
|
|
|
* @param array $parameters List of Memsource Parameters
|
|
|
|
*
|
|
|
|
* @return string The JSON answer from Memsource
|
|
|
|
*/
|
2019-06-25 13:47:05 +00:00
|
|
|
public function list(string $projectUid, array $parameters = []): string
|
2019-06-24 23:29:02 +00:00
|
|
|
{
|
|
|
|
$url = "/api2/v2/projects/{$projectUid}/jobs";
|
|
|
|
return $this->fetchApi->fetch('get', $url, $parameters);
|
|
|
|
}
|
|
|
|
}
|