diff options
author | Robin Appelman <robin@icewind.nl> | 2017-10-04 16:21:50 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-12-08 16:37:14 +0100 |
commit | 5133a31d3c713e3e3c562e6fcd131ed2738d8798 (patch) | |
tree | 7bb2499876e7a75caa8e4921de46d528b97ee062 /lib/private/Remote/Api/ApiFactory.php | |
parent | 74b5ce8fd4311f0d6f6a59e0636d343807b79d74 (diff) | |
download | nextcloud-server-5133a31d3c713e3e3c562e6fcd131ed2738d8798.tar.gz nextcloud-server-5133a31d3c713e3e3c562e6fcd131ed2738d8798.zip |
Add public api for remote api
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Remote/Api/ApiFactory.php')
-rw-r--r-- | lib/private/Remote/Api/ApiFactory.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/private/Remote/Api/ApiFactory.php b/lib/private/Remote/Api/ApiFactory.php new file mode 100644 index 00000000000..ea084c188f1 --- /dev/null +++ b/lib/private/Remote/Api/ApiFactory.php @@ -0,0 +1,40 @@ +<?php +/** + * @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OC\Remote\Api; + + +use OCP\Http\Client\IClientService; +use OCP\Remote\Api\IApiFactory; +use OCP\Remote\ICredentials; +use OCP\Remote\IInstance; + +class ApiFactory implements IApiFactory { + private $clientService; + + public function __construct(IClientService $clientService) { + $this->clientService = $clientService; + } + + public function getApiCollection(IInstance $instance, ICredentials $credentials) { + return new ApiCollection($instance, $credentials, $this->clientService); + } +} |