[tests-only][full-ci]Added test to update role and expiration date for share link (v1beta1) (#8071)

* Added test to update role and expiration date for share link

Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>

* Review address

---------

Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
This commit is contained in:
Sagar Gurung
2024-01-02 16:53:47 +05:45
committed by GitHub
parent a3a9757c48
commit 6e9b599195
5 changed files with 321 additions and 20 deletions

View File

@@ -1666,4 +1666,39 @@ class GraphHelper {
$body
);
}
/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $user
* @param string $password
* @param string $spaceId
* @param string $itemId
* @param mixed $body
* @param string $shareId
*
* @return ResponseInterface
* @throws GuzzleException
*/
public static function updateLinkShare(
string $baseUrl,
string $xRequestId,
string $user,
string $password,
string $spaceId,
string $itemId,
$body,
string $shareId
): ResponseInterface {
$url = self::getBetaFullUrl($baseUrl, "drives/$spaceId/items/$itemId/permissions/$shareId");
return HttpRequestHelper::sendRequestOnce(
$url,
$xRequestId,
'PATCH',
$user,
$password,
self::getRequestHeaders(),
$body
);
}
}