From 505c4d1750dc1b2edabaf64649015f1949dfe8af Mon Sep 17 00:00:00 2001 From: Benjamin Blake Date: Tue, 25 Feb 2020 12:24:11 -0700 Subject: [PATCH] Client - Added connections for new API requesters + Added a connection to the new Tags API requester + Added a connection to the new Branches API requester --- src/Client.php | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index de5a69e..2d98887 100644 --- a/src/Client.php +++ b/src/Client.php @@ -9,8 +9,10 @@ use Gitea\Models\Repository; use Gitea\Models\Tag; use Gitea\Models\Branch; -use Gitea\Api\Repositories; use Gitea\Api\Organizations; +use Gitea\Api\Repositories; +use Gitea\Api\Branches; +use Gitea\Api\Tags; use \JsonSerializable; @@ -132,6 +134,30 @@ class Client { return new Repositories($this, $this->getAuthToken()); } + /** + * Return the Branches api object + * + * @author Benjamin Blake (sitelease.ca) + * + * @return Branches + */ + public function branches() + { + return new Branches($this, $this->getAuthToken()); + } + + /** + * Return the Tags api object + * + * @author Benjamin Blake (sitelease.ca) + * + * @return Tags + */ + public function tags() + { + return new Tags($this, $this->getAuthToken()); + } + /** * Return the Repositories api object *