aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Remote/Api/ApiFactory.php
blob: 7daddd16011b3fd43f9ee24c98d7fc41b2d663eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
/**
 * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
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 {
	/** @var IClientService */
	private $clientService;

	public function __construct(IClientService $clientService) {
		$this->clientService = $clientService;
	}

	public function getApiCollection(IInstance $instance, ICredentials $credentials) {
		return new ApiCollection($instance, $credentials, $this->clientService);
	}
}