GraphService
class GraphService
This is the GraphService.
The main service that gets and sets data in Microsoft 365.
Properties
| protected AuthenticationServiceInterface | $authService | Drupal\o365\AuthenticationServiceInterface definition. |
|
| protected AuthmapInterface | $authmap | The externalauth authmap service. |
|
| protected CacheBackendInterface | $cacheBackend | The cache backend service. |
|
| protected AccountProxyInterface | $currentUser | The current user account. |
|
| protected LoggerChannelInterface | $logger | The modules logger. |
|
| protected O365LoggerServiceInterface | $messenger | The logger service. |
Methods
__construct(AuthenticationServiceInterface $authenticationService, O365LoggerServiceInterface $messenger, CacheBackendInterface $cacheBackend, LoggerChannelFactoryInterface $loggerChannelFactory, AuthmapInterface $authmap, AccountProxyInterface $currentUser)
Constructs a new GraphService object.
GraphCollectionRequest|bool
getCollectionData(string $endpoint, bool|string $returnType = FALSE, bool|string $version = FALSE)
Get a collection of data.
bool|string
getCurrentUserId()
Determine the office user ID.
mixed
getGraphData(string $endpoint, string $type = 'GET', bool $raw = FALSE, bool|string $version = FALSE, bool|string $returnType = FALSE, array $headers = [])
Get data from the MS GraphAPI.
int
getTimeout()
Get the Graph API timeout.
mixed
sendGraphData(string $endpoint, mixed $data = [], string $type = 'POST', bool $raw = FALSE, bool|string $version = FALSE, bool|string $returnType = FALSE, array $headers = [])
Send data to the MS GraphAPI.
void
setTimeout(int $timeout)
Set the Graph API timeout.
Details
at line 80
__construct(AuthenticationServiceInterface $authenticationService, O365LoggerServiceInterface $messenger, CacheBackendInterface $cacheBackend, LoggerChannelFactoryInterface $loggerChannelFactory, AuthmapInterface $authmap, AccountProxyInterface $currentUser)
Constructs a new GraphService object.
at line 265
GraphCollectionRequest|bool
getCollectionData(string $endpoint, bool|string $returnType = FALSE, bool|string $version = FALSE)
Get a collection of data.
at line 296
bool|string
getCurrentUserId()
Determine the office user ID.
at line 111
mixed
getGraphData(string $endpoint, string $type = 'GET', bool $raw = FALSE, bool|string $version = FALSE, bool|string $returnType = FALSE, array $headers = [])
Get data from the MS GraphAPI.
at line 306
int
getTimeout()
Get the Graph API timeout.
at line 146
mixed
sendGraphData(string $endpoint, mixed $data = [], string $type = 'POST', bool $raw = FALSE, bool|string $version = FALSE, bool|string $returnType = FALSE, array $headers = [])
Send data to the MS GraphAPI.
at line 316
void
setTimeout(int $timeout)
Set the Graph API timeout.