chore: update TypeScript build info cache
This commit is contained in:
@@ -44,11 +44,24 @@ export class PlaylistsService {
|
||||
return this.http.get<Playlist[]>(`${this.apiBase()}/playlists`, { params, withCredentials: true });
|
||||
}
|
||||
|
||||
// Public listing (no auth required)
|
||||
listPublic(limit = 100, offset = 0, q?: string): Observable<Playlist[]> {
|
||||
let params = new HttpParams().set('limit', String(limit)).set('offset', String(offset));
|
||||
if (q && q.trim().length) params = params.set('q', q.trim());
|
||||
return this.http.get<Playlist[]>(`${this.apiBase()}/playlists/public`, { params, withCredentials: true });
|
||||
}
|
||||
|
||||
get(id: string, limit = 200, offset = 0): Observable<Playlist & { items: PlaylistItem[] }> {
|
||||
const params = new HttpParams().set('limit', String(limit)).set('offset', String(offset));
|
||||
return this.http.get<Playlist & { items: PlaylistItem[] }>(`${this.apiBase()}/playlists/${encodeURIComponent(id)}`, { params, withCredentials: true });
|
||||
}
|
||||
|
||||
// Public view (owner or public)
|
||||
view(id: string, limit = 200, offset = 0): Observable<Playlist & { items: PlaylistItem[] }> {
|
||||
const params = new HttpParams().set('limit', String(limit)).set('offset', String(offset));
|
||||
return this.http.get<Playlist & { items: PlaylistItem[] }>(`${this.apiBase()}/playlists/${encodeURIComponent(id)}/view`, { params, withCredentials: true });
|
||||
}
|
||||
|
||||
create(title: string, description?: string, thumbnail?: string, isPrivate: boolean = true): Observable<Playlist> {
|
||||
return this.http.post<Playlist>(`${this.apiBase()}/playlists`, { title, description, thumbnail, isPrivate }, { withCredentials: true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user