add jukebox
This commit is contained in:
@@ -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, "");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user