add jukebox

This commit is contained in:
_Bastler
2021-11-28 17:30:19 +01:00
parent 49e695b67b
commit 5350e45ce6
6 changed files with 256 additions and 1 deletions
+30
View File
@@ -0,0 +1,30 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { environment } from '../../environments/environment';
@Injectable({
providedIn: 'root',
})
export class JukeboxService {
constructor(private http: HttpClient) {
}
check() {
return this.http.get(environment.apiUrl + "/jukebox");
}
search(query: string) {
return this.http.get(environment.apiUrl + "/jukebox/search?q=" + query);
}
searchOffset(query: string, offset: number) {
return this.http.get(environment.apiUrl + "/jukebox/search?q=" + query + "&offset=" + offset);
}
queue(uri: string) {
return this.http.post(environment.apiUrl + "/jukebox/queue?uri=" + uri, "");
}
}