mirror of
https://github.com/brunofontes/Memsource-API.git
synced 2024-11-24 03:07:10 +00:00
feat: added new Async and TM modules on main file
This commit is contained in:
parent
1788befec6
commit
adfea614ad
@ -13,6 +13,8 @@ use \BrunoFontes\Memsource\FetchApi;
|
|||||||
use \BrunoFontes\Memsource\Jobs;
|
use \BrunoFontes\Memsource\Jobs;
|
||||||
use \BrunoFontes\Memsource\Oauth;
|
use \BrunoFontes\Memsource\Oauth;
|
||||||
use \BrunoFontes\Memsource\Project;
|
use \BrunoFontes\Memsource\Project;
|
||||||
|
use \BrunoFontes\Memsource\TM;
|
||||||
|
use \BrunoFontes\Memsource\Async;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Memsource API class
|
* Memsource API class
|
||||||
@ -26,6 +28,8 @@ class Memsource
|
|||||||
private $_bilingualFile;
|
private $_bilingualFile;
|
||||||
private $_jobs;
|
private $_jobs;
|
||||||
private $_project;
|
private $_project;
|
||||||
|
private $_tm;
|
||||||
|
private $_async;
|
||||||
private $_fetchApi;
|
private $_fetchApi;
|
||||||
|
|
||||||
public function __construct(string $token = null, string $memsourceBaseUrl = 'https://cloud.memsource.com/web')
|
public function __construct(string $token = null, string $memsourceBaseUrl = 'https://cloud.memsource.com/web')
|
||||||
@ -72,4 +76,24 @@ class Memsource
|
|||||||
{
|
{
|
||||||
return $this->_project ?? $this->_project = new Project($this->_fetchApi);
|
return $this->_project ?? $this->_project = new Project($this->_fetchApi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Memsource API Async related functions
|
||||||
|
*
|
||||||
|
* @return Async
|
||||||
|
*/
|
||||||
|
public function async(): Async
|
||||||
|
{
|
||||||
|
return $this->_async ?? $this->_async = new Async($this->_fetchApi);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Memsource API TM related functions
|
||||||
|
*
|
||||||
|
* @return TM
|
||||||
|
*/
|
||||||
|
public function tm(): TM
|
||||||
|
{
|
||||||
|
return $this->_tm ?? $this->_tm = new TM($this->_fetchApi);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user