mirror of
https://github.com/abraunegg/onedrive
synced 2026-03-14 14:35:46 +01:00
added deleteById
This commit is contained in:
parent
a732845db3
commit
61c5ea7789
1 changed files with 11 additions and 0 deletions
|
|
@ -192,6 +192,17 @@ final class OneDriveApi
|
|||
return result;
|
||||
}
|
||||
|
||||
//https://dev.onedrive.com/items/delete.htm
|
||||
void deleteById(const(char)[] id, const(char)[] eTag = null)
|
||||
{
|
||||
checkAccessTokenExpired();
|
||||
char[] url = itemByIdUrl ~ id;
|
||||
if (eTag) http.addRequestHeader("If-Match", eTag);
|
||||
del(url, http);
|
||||
// remove the if-match header
|
||||
if (eTag) setAccessToken(accessToken);
|
||||
}
|
||||
|
||||
private void redeemToken(const(char)[] authCode)
|
||||
{
|
||||
string postData = "client_id=" ~ clientId ~ "&redirect_url=" ~ redirectUrl ~ "&client_secret=" ~ clientSecret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue