mirror of
https://github.com/brunofontes/Memsource-API.git
synced 2024-11-23 19:00:50 +00:00
Added: Project API class
This commit is contained in:
parent
460812852e
commit
084dec87e2
25
src/Project.php
Normal file
25
src/Project.php
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user