# echo ' Post from the command line' | Blogger -n 3062883415508658133 -s 'cmd line2' -d
Blogger: module {
PATH : con "/dis/lib/Blogger.dis";
User : adt {
authtoken : string;
blogs : list of ref Blog;
blog_by_id: fn(u : self ref User, id : string) : ref Blog;
blog_by_name: fn(u : self ref User, name : string) : ref Blog;
list_blogs: fn(u : self ref User);
new_post: fn(u : self ref User, subject, blogid : string, draft : int) : string;
fill_blog_list: fn(u : self ref User);
};
Link : adt {
rel, href : string;
};
Mime : adt {
xml : fn(m : self ref Mime, tag : string) : string;
plain : fn(m : self ref Mime) : string;
pick {
png =>
src : string;
html =>
data : string;
xhtml =>
data : string;
text =>
data : string;
}
};
Entry : adt {
id : string;
slug : string;
title, summary, content : ref Mime;
author_name, author_email : string;
updated : string;
tags : list of string;
xml : fn(e : self ref Entry, draft : int) : string;
};
Blog : adt {
id, published, updated : string;
title, summary : ref Mime;
tags : list of string;
new_post : fn(b : self ref Blog, u : ref User, e : ref Entry, draft : int) : string;
};
init: fn(nil: ref Context, nil: list of string);
log_in: fn(email, password : string) : ref User;
mime: fn(mimetype, body: string) : ref Mime;
};
|