const _get = require('lodash/get');
const APIClient = require('../lib2/APIClient');
const getBasicRequestHeaders = require('../lib2/getBasicRequestHeaders');

module.exports = function setter(req) {
    return new APIClient(req, _get(req, 'config.api.setter'), {
        ...getBasicRequestHeaders(req),
        'X-Ya-Service-Ticket': _get(req, 'tvm.tickets.setter.ticket'),
    });
};
