Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.radio.weblog.bloggerApi.rpcHandlers.deletePost
on deletePost (appkey, postid, username, password, publish) {
<<Changes:
<<11/30/02; 3:10:16 PM by JES
<<Call deleteItem callbacks before deleting the post.
<<1/22/02; 5:44:05 PM by DW
<<Created.
radio.weblog.bloggerApi.checkUser (client, true, username, password);
local (adrblog = radio.weblog.init ());
local (adrpost = @adrblog^.posts.[string.padwithzeros (postid, 8)]);
try { //call the callbacks
if not defined (user.radio.callbacks.deleteItem) {
new (tabletype, @user.radio.callbacks.deleteItem)};
local (adrcallback);
for adrcallback in @user.radio.callbacks.deleteItem {
try {
while typeOf (adrcallback^) == addressType {
adrcallback = adrcallback^};
adrcallback^ (adrpost)}}};
try {delete (adrpost)};
if publish {
radio.weblog.publish ()};
return (true)}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.