Sourcecode in MetaWeblogApi/metaWeblogAPI.js:
1: function getPost(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 story with id " + postid);
6: // check if user is allowed to edit this story
7: try {
8: entry.checkView(usr, entry.site.members.getMembershipLevel(usr));
9: } catch (deny) {
10: throw("You're not allowed to edit the story with id " + postid);
11: }
12: return this.convertStoryToStruct(entry);
13: }
|