haravan-client
Version:
### Haravan API
27 lines (26 loc) • 962 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getHaravanPublicCollections = exports.getHaravanPublicCollection = void 0;
const common_1 = require("../common");
function getHaravanPublicCollection({ url, domain, handle }) {
const config = common_1.makeRequestConfig({
url: url || `${domain}/collections/${handle}.json`,
accessToken: '',
method: 'GET',
rootField: 'collection',
delay: 0
});
return common_1.sendRequest(config);
}
exports.getHaravanPublicCollection = getHaravanPublicCollection;
function getHaravanPublicCollections({ domain, page }) {
const config = common_1.makeRequestConfig({
url: `${domain}/collections.json?page=${page}`,
accessToken: '',
method: 'GET',
rootField: 'collections',
delay: 0
});
return common_1.sendRequest(config);
}
exports.getHaravanPublicCollections = getHaravanPublicCollections;