KiiObject の削除
delete()
メソッドで指定した KiiObject を削除できます。
-
// Instantiate a KiiObject with its URI. var object = KiiObject.objectWithURI("Set the URI of an existing KiiObject here"); // Delete the KiiObject. object.delete().then( function(theObject) { // Do something. } ).catch( function(error) { var theObject = error.target; var errorString = error.message; // Handle the error. } );
-
// Instantiate a KiiObject with its URI. var object = KiiObject.objectWithURI("Set the URI of an existing KiiObject here"); // Delete the KiiObject. object.delete({ success: function(theObject) { // Do something. }, failure: function(theObject, errorString) { // Handle the error. } });
delete()
メソッドを呼ぶとすぐに削除され、save()
メソッドを呼ぶ必要はありません。
削除対象 KiiObject が Object Body を持っていた場合は、Object Body とその公開済み URL も同時に削除されます。詳細は Object Body の削除 をご覧ください。
複数件の KiiObject をまとめて削除する API はありませんが、Bucket ごとまとめて削除することは可能です。詳細は Bucket の削除 をご覧ください。