From 084dec87e2f3646535c26a47512f9934c1dd6b18 Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Fri, 21 Jun 2019 21:13:54 -0300 Subject: [PATCH] Added: Project API class --- src/Project.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/Project.php diff --git a/src/Project.php b/src/Project.php new file mode 100644 index 0000000..fc4a478 --- /dev/null +++ b/src/Project.php @@ -0,0 +1,25 @@ + + * @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); + } +}