ボックス api 内のファイルとフォルダーを削除するには、次の URL の手順に従います。
http://developers.box.com/docs/#files-delete-a-file
http://developers.box.com/docs/#folders-delete-a-folder
次のコードを使用して、 box api 内のファイルを削除しています。フォルダの削除には成功しましたが、ファイルの削除に失敗しました。
NSString *str;
if ([type isEqualToString:@"folder"])
{
str = [NSString stringWithFormat:@"https://api.box.com/2.0/folders/%@?recursive=true&access_token=%@",folder_id,str_access_token];
}
else
{
str = [NSString stringWithFormat:@"https://api.box.com/2.0/files/%@&access_token=%@&If-Match=%@",folder_id,str_access_token,etag];
}
ASIFormDataRequest *postParams = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:str]];
[postParams setRequestMethod:@"DELETE"];
[postParams startAsynchronous];
postParams.delegate = self ;