UNPKG

@rero/ng-core

Version:

RERO angular core library.

45 lines (44 loc) 1.55 kB
import { CoreConfigService } from '../core-config.service'; import * as i0 from "@angular/core"; /** * Service giving information about API. */ export declare class ApiService { protected configService: CoreConfigService; baseUrl: string; endpointPrefix: string; /** * Returns Invenio API Endpoint corresponding to type. * * @param type Type of the resource. * @param absolute If absolute or relative url must be returned. * @return Endpoint as string. */ getEndpointByType(type: string, absolute?: boolean): string; /** * Returns Invenio-RERO-base API export endpoint corresponding to type. * * @param type Type of the resource. * @param absolute If absolute or relative url must be returned. * @return Endpoint as string. */ getExportEndpointByType(type: string, absolute?: boolean): string; /** * Returns $ref endpoint to resource. * * @param type Type of resource. * @param id Id of the record. * @return Ref endpoint as string. */ getRefEndpoint(type: string, id: string): string; /** * Returns invenio API FormOption Endpoint corresponding to type. * * @param type Type of the resource * @param absolute If absolute or relative url must be returned. * @return Schema form endpoint. */ getSchemaFormEndpoint(type: string, absolute?: boolean): string; static ɵfac: i0.ɵɵFactoryDeclaration<ApiService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ApiService>; }