instagram-private-api
Version:
Instagram private API wrapper for full access to instagram
20 lines • 725 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const repository_1 = require("../core/repository");
const sizeOf = require("image-size");
class PublishService extends repository_1.Repository {
async photo(options) {
const uploadedPhoto = await this.client.upload.photo({
file: options.file,
});
const imageSize = await sizeOf(options.file);
return await this.client.media.configure({
upload_id: uploadedPhoto.upload_id,
width: imageSize.width,
height: imageSize.height,
caption: options.caption,
});
}
}
exports.PublishService = PublishService;
//# sourceMappingURL=publish.service.js.map
;