本文整理汇总了TypeScript中urls.pubs类的典型用法代码示例。如果您正苦于以下问题:TypeScript pubs类的具体用法?TypeScript pubs怎么用?TypeScript pubs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了pubs类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: update
update(pub: Pub.Detail): Observable<Pub.Detail> {
return this.http.put(Url.pubs.one(pub.id),
{ name: pub.name, description: pub.description, phone: pub.phone, email: pub.email, city_id: pub.city.id, address: pub.address }
, this.authService.authorizingOptions())
.map(this.extractData)
.catch(this.handleError);
}
示例2: delete
delete(pub_id: number): Observable<Pub.Detail> {
return this.http.delete(Url.pubs.one(pub_id), this.authService.authorizingOptions())
.map(this.extractData)
.catch(this.handleError);
}
示例3: getAllPubs
getAllPubs(page: number): Observable<Pub.List> {
return this.http.get(Url.pubs.search(page), this.authService.authorizingOptions())
.map(this.extractData)
.catch(this.handleError);
}
示例4: getPub
getPub(id: number): Observable<Pub.Detail> {
return this.http.get(Url.pubs.one(id))
.map(this.extractData)
.catch(this.handleError);
}
示例5: getPubs
getPubs(page: number, filter: string = '', city: string = ''): Observable<Pub.List> {
return this.http.get(Url.pubs.search(page, filter, city))
.map(this.extractData)
.catch(this.handleError);
}