2026-03-14 16:26:22 +03:30
|
|
|
import { IListingResponse } from '@/core/models/service.model';
|
|
|
|
|
import ISummary from '@/core/models/summary';
|
|
|
|
|
import { HttpClient } from '@angular/common/http';
|
|
|
|
|
import { Injectable } from '@angular/core';
|
|
|
|
|
import { Observable } from 'rxjs';
|
|
|
|
|
import { CATALOG_API_ROUTES } from './apiRoutes';
|
|
|
|
|
|
|
|
|
|
@Injectable({ providedIn: 'root' })
|
|
|
|
|
export class CatalogsService {
|
|
|
|
|
constructor(private http: HttpClient) {}
|
|
|
|
|
|
|
|
|
|
private apiRoutes = CATALOG_API_ROUTES;
|
|
|
|
|
|
|
|
|
|
getGuilds(): Observable<IListingResponse<ISummary>> {
|
|
|
|
|
return this.http.get<IListingResponse<ISummary>>(this.apiRoutes.guilds());
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-16 20:59:28 +03:30
|
|
|
getGuildGoodCategories(guildId: string): Observable<IListingResponse<ISummary>> {
|
|
|
|
|
return this.http.get<IListingResponse<ISummary>>(this.apiRoutes.guildGoodCategories(guildId));
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-14 16:26:22 +03:30
|
|
|
getProviders(): Observable<IListingResponse<ISummary>> {
|
|
|
|
|
return this.http.get<IListingResponse<ISummary>>(this.apiRoutes.providers());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getDevices(): Observable<IListingResponse<ISummary>> {
|
|
|
|
|
return this.http.get<IListingResponse<ISummary>>(this.apiRoutes.devices());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getDeviceBrands(): Observable<IListingResponse<ISummary>> {
|
|
|
|
|
return this.http.get<IListingResponse<ISummary>>(this.apiRoutes.deviceBrands());
|
|
|
|
|
}
|
|
|
|
|
}
|