Last active
July 10, 2023 21:11
-
-
Save isvargasmsft/fb768299ac9e2121a359290c404c3e4e to your computer and use it in GitHub Desktop.
Request builder pattern for PHP SDK 2.0.0-RC5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// v1.x | |
$response = $graphClient->createRequest('GET', '/users/userId/messages') | |
->setReturnType(Model\User::class) | |
->execute(); | |
// v2.0-RC | |
$response = $graphServiceClient->usersById('userId')->messages()->get()->wait(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment