-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathGraphRequestAdapter.php
More file actions
44 lines (38 loc) · 1.25 KB
/
GraphRequestAdapter.php
File metadata and controls
44 lines (38 loc) · 1.25 KB
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
35
36
37
38
39
40
41
42
43
44
<?php
/**
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* Licensed under the MIT License. See License in the project root
* for license information.
*/
namespace Microsoft\Graph;
use GuzzleHttp\Client;
use Microsoft\Graph\Core\BaseGraphRequestAdapter;
use Microsoft\Graph\Core\Middleware\Option\GraphTelemetryOption;
use Microsoft\Kiota\Abstractions\Authentication\AuthenticationProvider;
/**
* Class GraphRequestAdapter
* @package Microsoft\Graph
* @copyright 2022 Microsoft Corporation
* @license https://opensource.org/licenses/MIT MIT License
* @link https://developer.microsoft.com/graph
*/
class GraphRequestAdapter extends BaseGraphRequestAdapter
{
/**
* Create new
*
* @param AuthenticationProvider $authenticationProvider
* @param Client|null $httpClient
*/
public function __construct(AuthenticationProvider $authenticationProvider, ?Client $httpClient = null)
{
parent::__construct($this->getTelemetryConfig(), $authenticationProvider, null, null, $httpClient);
}
/**
* @return GraphTelemetryOption
*/
private function getTelemetryConfig(): GraphTelemetryOption
{
return new GraphTelemetryOption(GraphConstants::API_VERSION, GraphConstants::SDK_VERSION);
}
}