aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Remote/Api/ApiCollection.php
blob: 65039f4b5aa16e715be99200fe78d698f1bfd8e4 (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
25
26
27
28
29
30
31
32
33
34
<?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\IApiCollection;
use OCP\Remote\ICredentials;
use OCP\Remote\IInstance;

class ApiCollection implements IApiCollection {
	/** @var IInstance */
	private $instance;
	/** @var ICredentials */
	private $credentials;
	/** @var IClientService */
	private $clientService;

	public function __construct(IInstance $instance, ICredentials $credentials, IClientService $clientService) {
		$this->instance = $instance;
		$this->credentials = $credentials;
		$this->clientService = $clientService;
	}

	public function getCapabilitiesApi() {
		return new OCS($this->instance, $this->credentials, $this->clientService);
	}

	public function getUserApi() {
		return new OCS($this->instance, $this->credentials, $this->clientService);
	}
}