Skip to content

Commit

Permalink
Fix path-based addressing syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
JC-comp committed Oct 22, 2023
1 parent 93d590d commit 5a4a351
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/onedrive.d
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,9 @@ class OneDriveApi {
JSONValue getPathDetailsByDriveId(string driveId, string path) {
checkAccessTokenExpired();
string url;
// Required format: /drives/{drive-id}/root:/{item-path}
url = driveByIdUrl ~ driveId ~ "/root:/" ~ encodeComponent(path);
// https://learn.microsoft.com/en-us/onedrive/developer/rest-api/concepts/addressing-driveitems?view=odsp-graph-online
// Required format: /drives/{drive-id}/root:/{item-path}:
url = driveByIdUrl ~ driveId ~ "/root:/" ~ encodeComponent(path) ~ ":";
return get(url);
}

Expand Down

0 comments on commit 5a4a351

Please sign in to comment.