Added: Project API class

This commit is contained in:
Bruno F. Fontes 2019-06-21 21:13:54 -03:00
parent 460812852e
commit 084dec87e2
Signed by: brunofontes
GPG Key ID: EE3447CE80048495

25
src/Project.php Normal file
View File

@ -0,0 +1,25 @@
<?php
/**
* A very compact and simple Memsource API library
*
* @author Bruno Fontes <developer@brunofontes.net>
* @link https://github.com/brunofontes
*/
namespace BrunoFontes\Memsource;
class Project extends \BrunoFontes\Memsource\BaseApi
{
private $_url = '/api2/v1/projects';
/**
* List projects
*
* @param string $queryParams An array with the Query parameters to filter projects
*
* @return string The JSON answer from Memsource
*/
public function listProjects(array $queryParams = []): string
{
return $this->fetchApi->fetch('get', $this->_url, $queryParams);
}
}