import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class AlbumService {

  constructor(private http : HttpClient) { }

  headers() {
    return this.http.get('/napi/coloring/web/album/headers');
  }

  pagerAll(query: string) {
    return this.http.get(`/napi/coloring/web/album/all?${query}`);
  }

  get(id: string) {
    return this.http.get(`/napi/coloring/web/album/${id}`)
  }

  /**
   * update album.
   * @param data FormData
   */
  update(data: FormData, id: string) {
    return this.http.patch(`/napi/coloring/web/album/${id}`, data);
  }

  add(data) {
    return this.http.post('/napi/coloring/web/album/', data);
  }

  remove(id) {
    return this.http.delete(`/napi/coloring/web/album/${id}`);
  }

  translateOptions() {
    return this.http.get('/napi/web/translate/options');
  }

  epgOption() {
    return this.http.get('/napi/web/epg/options');
  }
  
}
