Set up Ghost Admin interface

This commit is contained in:
Hippo 2019-12-24 22:22:58 +05:30
parent 9ae10df8a3
commit f8da665b5b

View file

@ -4,9 +4,16 @@ const fs = require('fs')
const getPost = require('mediumexporter').getPost const getPost = require('mediumexporter').getPost
const { createClient } = require('webdav') const { createClient } = require('webdav')
const readline = require('readline') const readline = require('readline')
const GhostAdminAPI = require('@tryghost/admin-api')
const MEDIUM_IMG_CDN = 'https://miro.medium.com/fit/c/' const MEDIUM_IMG_CDN = 'https://miro.medium.com/fit/c/'
const ghostAdmin = new GhostAdminAPI({
url: process.env.GHOST_URL,
version: process.env.GHOST_VERSION,
key: process.env.GHOST_ADMIN_KEY
})
/** /**
* function [fetchFromMedium] * function [fetchFromMedium]
* @returns [string] status * @returns [string] status