Need API to get "Post object by passing only post id"
-
Hi,
We need API to get "Post object by passing only post id".
We have search around source code but we have not found any API which fullfil our requirement.Please let us know about this api.
And also how we can find/use existing api into our plugin.Any help would be greatly appreciated.
Thanks!!! -
The API already exists here
What you do is, first require the API module:
var posts = module.parent.require("./posts"); // requires "/src/posts.js" posts.getPostData(pid, function(err, postObject){ if(err){ // there was some sort of error return; } // do stuff with postData });
-
Copyright © 2024 NodeBB | Contributors