UNPKG

rs-restangular

Version:

Restful Resources service for Angular 2 apps

22 lines (21 loc) 962 B
import { Response, RequestOptionsArgs } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import { RestangularConfig } from './config'; import { PathInterface } from './path.interface'; import 'rxjs/add/operator/map'; export declare class RestangularPath { config: RestangularConfig; parent: RestangularPath; route: PathInterface; constructor(config: RestangularConfig, parent?: RestangularPath); private __normalizeRoute(route); all(route: string): RestangularPath; one(route: string, id: string | number): RestangularPath; get(options?: RequestOptionsArgs): Observable<Response>; getList(options?: RequestOptionsArgs): Observable<Response>; post(body: any, options?: RequestOptionsArgs): Observable<Response>; put(body: any, options?: RequestOptionsArgs): Observable<Response>; remove(options?: RequestOptionsArgs): Observable<Response>; toArray(): Array<string>; toString(): string; }