0.2.9 • Published 6 years ago
wp-node v0.2.9
wp-node
Caches WordPress in mongo using a JSON API. It can also cache any json, as long as the request returns an json object.
You can use either WordPress Public API or another plugin like this one: http://wordpress.org/plugins/json-api/
After you receive the object you can do anything you need in your views.
Simple usage
var wpnode = require('wp-node');
wpnode.cache({
url : "https://maps.googleapis.com/maps/api/geocode/json",
db : db, //set your mongo database
qs : { //Define you query variables
address : 11205,
sensor : false
}
}, function(r) {
//Here's your cached data (r)
});
Setting a time to live
wpnode.setGlobalOptions({
TTL : 86400, //(Optional/Default) Cache time is in seconds. This will cache the data for a day
logger : false, //(Optional/Default) Turn on for debug mode
db : db, //(Optional) Required if you don't plan to pass your mongo db object when calling the cache method
endpoint : 'http://www.yourwordpress.com/api/' //(Required in order to generate a sitemap)
})
WordPress Functions (Alpha)
Helping with sitemaps
wpnode.generateSiteMap({
pre_link: '/blog/post'
}, function(err, posts){
if (err) {
console.log(err.message);
return;
}
})
0.2.9
6 years ago
0.2.8
6 years ago
0.2.7
7 years ago
0.2.6
7 years ago
0.2.5
9 years ago
0.2.4
9 years ago
0.2.3
9 years ago
0.2.2
10 years ago
0.2.1
10 years ago
0.2.0
10 years ago
0.1.9
10 years ago
0.1.8
10 years ago
0.1.7
10 years ago
0.1.6
11 years ago
0.1.5
11 years ago
0.1.4
11 years ago
0.1.3
11 years ago
0.1.2
11 years ago
0.1.1
11 years ago
0.1.0
11 years ago
0.0.9
11 years ago
0.0.8
11 years ago
0.0.7
11 years ago
0.0.6
11 years ago
0.0.5
11 years ago
0.0.4
11 years ago
0.0.3
11 years ago
0.0.2
11 years ago
0.0.1
11 years ago
0.0.0
11 years ago