import {Log} from "fme-logger"; var L = new Log("test-fme-wordpress"); import {WordPress, WpConfig, WpImageOptions } from "./fme-wordpress"; var config = require("/root/keys/wordpress-redliontrader.json") as WpConfig; var wp = new WordPress(config); var getDocs = async(targetUrl:string) => { config.endpoint = targetUrl+"/wp-json"; // var docs = await wp.get(); // L.info("wp returned",docs); } var uploadImage = async () => { var options:WpImageOptions = { title : "Title is test image", description : "This is the description", caption:"this is a caption", path:"./test.png.png", type:"image/png" } var id = await wp.uploadImage(options); L.info("uploaded a test image and got id",id) } //getDocs("https://mrtopstep.com") uploadImage(); setInterval(()=> { L.info("poll") },1000*60*10)