Sourcecode in BloggerApi/bloggerAPI.js:
1: function deletePost(appkey, postid, username, password, publish) {
2: var usr = root.blogger.getUser(username, password);
3: var entry = root.storiesByID.get(postid.toString());
4: if (!entry)
5: throw("Couldn't find the entry with id " + postid);
6: // check if user is allowed to delete the entry
7: try {
8: entry.checkDelete(usr, entry.site.members.getMembershipLevel(usr));
9: entry._parent.deleteStory(entry);
10: return true;
11: } catch (e) {
12: if (e instanceof DenyException)
13: throw ("You're not allowed to delete the entry with id " + postid);
14: else
15: throw(e.toString());
16: }
17: return;
18: }
|