mirror of
https://github.com/brunofontes/Memsource-API.git
synced 2024-11-24 03:07:10 +00:00
Project: Included a getProject API call
This commit is contained in:
parent
e898aa8749
commit
898f03fd92
@ -34,7 +34,7 @@ class FetchApi
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function fetch(string $method, string $url, array $parameters, $filename = '') : string
|
public function fetch(string $method, string $url, array $parameters = [], $filename = '') : string
|
||||||
{
|
{
|
||||||
$setopt = [];
|
$setopt = [];
|
||||||
switch ($method) {
|
switch ($method) {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
* @author Bruno Fontes <developer@brunofontes.net>
|
* @author Bruno Fontes <developer@brunofontes.net>
|
||||||
* @link https://github.com/brunofontes
|
* @link https://github.com/brunofontes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace BrunoFontes\Memsource;
|
namespace BrunoFontes\Memsource;
|
||||||
|
|
||||||
class Project extends \BrunoFontes\Memsource\BaseApi
|
class Project extends \BrunoFontes\Memsource\BaseApi
|
||||||
@ -22,4 +23,16 @@ class Project extends \BrunoFontes\Memsource\BaseApi
|
|||||||
{
|
{
|
||||||
return $this->fetchApi->fetch('get', $this->_url, $queryParams);
|
return $this->fetchApi->fetch('get', $this->_url, $queryParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return details about a single project
|
||||||
|
*
|
||||||
|
* @param string $projectUid The project UID
|
||||||
|
*
|
||||||
|
* @return string A json string with all project info
|
||||||
|
*/
|
||||||
|
public function getProject(string $projectUid): string
|
||||||
|
{
|
||||||
|
return $this->fetchApi->fetch('get', "{$this->_url}/{$projectUid}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user