import { APIBase } from '@dvn/core/api/apiBase';
export class DamgaApi {
  constructor(endpoint, defaultHeaders = {}) {
    this.getDnsRecord = (domain) => this.api.post(`tools/dns-lookup`, { domain });
    this.createDomain = (domain) => this.api.post(`domains`, domain);
    this.deleteDomain = (id) => this.api.delete(`domains/${id}`);
    this.moveDomain = (id, body) => this.api.post(`domains/${id}/move`, body);
    this.updateDomain = (id, domain) => this.api.put(`domains/${id}`, domain);
    this.api = new APIBase(endpoint, defaultHeaders);
  }
}
