Skip to content

Commit d0918ba

Browse files
committed
moved emails resource into an emails folder
1 parent cd96296 commit d0918ba

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/MsGraph.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Dcblogdev\MsGraph\Events\NewMicrosoft365SignInEvent;
1010
use Dcblogdev\MsGraph\Models\MsGraphToken;
1111
use Dcblogdev\MsGraph\Resources\Contacts;
12-
use Dcblogdev\MsGraph\Resources\Emails;
12+
use Dcblogdev\MsGraph\Resources\Emails\Emails;
1313
use Dcblogdev\MsGraph\Resources\Files;
1414
use Dcblogdev\MsGraph\Resources\Sites;
1515
use Dcblogdev\MsGraph\Resources\Tasks\TaskLists;
@@ -340,7 +340,8 @@ protected function guzzle(string $type, string $request, array $data = [], array
340340
return $responseObject;
341341

342342
} catch (ClientException $e) {
343-
return json_decode(($e->getResponse()->getBody()->getContents()));
343+
throw new Exception($e->getMessage());
344+
//return json_decode(($e->getResponse()->getBody()->getContents()));
344345
} catch (Exception $e) {
345346
throw new Exception($e->getMessage());
346347
}

src/Resources/Emails.php renamed to src/Resources/Emails/Emails.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
<?php
22

3-
namespace Dcblogdev\MsGraph\Resources;
3+
namespace Dcblogdev\MsGraph\Resources\Emails;
44

55
use Dcblogdev\MsGraph\Facades\MsGraph;
66
use Exception;
77

88
class Emails extends MsGraph
99
{
10+
public function folders(): Folders
11+
{
12+
return new Folders;
13+
}
14+
1015
private string $top = '';
1116

1217
private string $skip = '';

0 commit comments

Comments
 (0)