import _ from 'lodash';
import { requestApi } from 'lib/requestApi';

const api = { subscribe, request };

_.set(window.ya.connect, 'api.sender', api);

export default api;

function subscribe(options) {
    return requestApi('PUT', 'sender/subscribe', { data: options });
}

function request(options) {
    return requestApi('POST', 'sender/subscribe/request', { data: options });
}
