chore: update TypeScript build info cache

This commit is contained in:
2025-09-18 22:20:52 -04:00
parent bcfb46ef7a
commit 41255a8126
22 changed files with 529 additions and 665 deletions
+13
View File
@@ -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 });
}