From adfea614ad803521ec90a7739d5fc6db0e68bf1d Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Fri, 23 Dec 2022 00:26:18 -0300 Subject: [PATCH] feat: added new Async and TM modules on main file --- src/Memsource.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/Memsource.php b/src/Memsource.php index aa75897..a9e5e05 100644 --- a/src/Memsource.php +++ b/src/Memsource.php @@ -13,6 +13,8 @@ use \BrunoFontes\Memsource\FetchApi; use \BrunoFontes\Memsource\Jobs; use \BrunoFontes\Memsource\Oauth; use \BrunoFontes\Memsource\Project; +use \BrunoFontes\Memsource\TM; +use \BrunoFontes\Memsource\Async; /** * Memsource API class @@ -26,6 +28,8 @@ class Memsource private $_bilingualFile; private $_jobs; private $_project; + private $_tm; + private $_async; private $_fetchApi; 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); } + + /** + * 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); + } }