Sourcecode in BloggerApi/bloggerAPI.js:
1: function getPost(appkey, postid, username, password) {
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: try {
7: entry.checkEdit(usr, entry.site.members.getMembershipLevel(usr));
8: } catch (deny) {
9: throw ("You're not allowed to edit the entry with id " + postid);
10: }
11: var result = new Object();
12: result.content = entry.content.getProperty("text");
13: result.userid = entry.creator.name;
14: result.postid = entry._id;
15: result.dateCreated = entry.createtime;
16: return result;
17: }
|