UNPKG

haravan-client

Version:
29 lines (28 loc) 940 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getHaravanArticles = exports.postHaravanArticle = void 0; const common_1 = require("./common"); function postHaravanArticle({ accessToken, article, delay, blogId }) { const config = common_1.makeRequestConfig({ path: `/web/blogs/${blogId}/articles.json`, method: 'POST', accessToken, data: { article }, rootField: 'article', delay }); return common_1.sendRequest(config); } exports.postHaravanArticle = postHaravanArticle; function getHaravanArticles({ accessToken, query, delay, blogId }) { const config = common_1.makeRequestConfig({ path: `/web/blogs/${blogId}/articles.json`, method: 'GET', accessToken, rootField: 'article', delay, query }); return common_1.sendRequest(config); } exports.getHaravanArticles = getHaravanArticles;