mirror of
https://gitlab.com/openlp/web-remote.git
synced 2024-12-25 12:44:06 +00:00
Fix all requests
This commit is contained in:
parent
3a19146d17
commit
fc9b13e971
@ -48,115 +48,64 @@ export class OpenLPService {
|
|||||||
return this.http.get<ServiceItem[]>(`${this.apiURL}/service/list`);
|
return this.http.get<ServiceItem[]>(`${this.apiURL}/service/list`);
|
||||||
}
|
}
|
||||||
|
|
||||||
sendItemLive(plugin, id) {}
|
|
||||||
showAlert(text) {}
|
|
||||||
addItemToService(plugin, id) {}
|
|
||||||
|
|
||||||
getSearchablePlugins(): Observable<PluginDescription[]> {
|
getSearchablePlugins(): Observable<PluginDescription[]> {
|
||||||
return this.http.get<PluginDescription[]>(`${this.apiURL}/plugin/search`);
|
return this.http.get<PluginDescription[]>(`${this.apiURL}/plugin/search`);
|
||||||
}
|
}
|
||||||
|
|
||||||
setServiceItem(id:number) {
|
setServiceItem(id:number): Observable<any> {
|
||||||
|
return this.http.get(`${this.apiURL}/service/set?id=${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
search(plugin, text) {
|
search(plugin, text): Observable<any> {
|
||||||
return this.http.get(`${this.apiURL}/${plugin}/search?q=${text}`);
|
return this.http.get(`${this.apiURL}/${plugin}/search?q=${text}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// setServiceItem(id:number) {
|
setSlide(id): Observable<any> {
|
||||||
// this.http.get('http://localhost:4316/service/set', buildNumberParams(id))
|
return this.http.get(`${this.apiURL}/controller/live/set?id=${id}`);
|
||||||
// .toPromise()
|
|
||||||
// .then(response => console.log(response.json().results))
|
|
||||||
// .catch(this.dropError);
|
|
||||||
// }
|
|
||||||
|
|
||||||
/*
|
|
||||||
setSlide(id) {
|
|
||||||
this.http.get('http://localhost:4316/controller/live/set', buildNumberParams(id))
|
|
||||||
.toPromise()
|
|
||||||
.then(response => console.log(response.json().results))
|
|
||||||
.catch(this.dropError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nextItem() {
|
nextItem(): Observable<any> {
|
||||||
this.http.get('http://localhost:4316/service/next')
|
return this.http.get(`${this.apiURL}/service/next`);
|
||||||
.toPromise()
|
|
||||||
.then(response => console.log(response.json().results))
|
|
||||||
.catch(this.dropError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
previousItem() {
|
previousItem(): Observable<any> {
|
||||||
this.http.get('http://localhost:4316/service/previous')
|
return this.http.get(`${this.apiURL}/service/previous`);
|
||||||
.toPromise()
|
|
||||||
.then(response => console.log(response.json().results))
|
|
||||||
.catch(this.dropError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nextSlide() {
|
nextSlide(): Observable<any> {
|
||||||
this.http.get('http://localhost:4316/controller/live/next')
|
return this.http.get(`${this.apiURL}/controller/live/next`);
|
||||||
.toPromise()
|
|
||||||
.then(response => console.log(response.json().results))
|
|
||||||
.catch(this.dropError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
previousSlide() {
|
previousSlide(): Observable<any> {
|
||||||
this.http.get('http://localhost:4316/controller/live/previous')
|
return this.http.get(`${this.apiURL}/controller/live/previous`);
|
||||||
.toPromise()
|
|
||||||
.then(response => console.log(response.json().results))
|
|
||||||
.catch(this.dropError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
blankDisplay() {
|
blankDisplay(): Observable<any> {
|
||||||
this.http.get('http://localhost:4316/display/blank')
|
return this.http.get(`${this.apiURL}/display/blank`);
|
||||||
.toPromise()
|
|
||||||
.then(response => console.log(response.json().results))
|
|
||||||
.catch(this.dropError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
themeDisplay() {
|
themeDisplay(): Observable<any> {
|
||||||
this.http.get('http://localhost:4316/display/theme')
|
return this.http.get(`${this.apiURL}/display/theme`);
|
||||||
.toPromise()
|
|
||||||
.then(response => console.log(response.json().results))
|
|
||||||
.catch(this.dropError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
desktopDisplay() {
|
desktopDisplay(): Observable<any> {
|
||||||
this.http.get('http://localhost:4316/display/desktop')
|
return this.http.get(`${this.apiURL}/display/desktop`);
|
||||||
.toPromise()
|
|
||||||
.then(response => console.log(response.json().results))
|
|
||||||
.catch(this.dropError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
showDisplay() {
|
showDisplay(): Observable<any> {
|
||||||
this.http.get('http://localhost:4316/display/show')
|
return this.http.get(`${this.apiURL}/display/show`);
|
||||||
.toPromise()
|
|
||||||
.then(response => console.log(response.json().results))
|
|
||||||
.catch(this.dropError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
showAlert(text) {
|
showAlert(text): Observable<any> {
|
||||||
this.http.get('http://localhost:4316/alert', buildTextParams(text))
|
return this.http.get(`${this.apiURL}/alert?text=${text}`);
|
||||||
.toPromise()
|
|
||||||
.then(response => console.log(response.json().results))
|
|
||||||
.catch(this.dropError);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
sendItemLive(plugin, id) {
|
|
||||||
this.http.get('http://localhost:4316/' + plugin + '/live', buildNumberParams(id))
|
|
||||||
.toPromise()
|
|
||||||
.then(response => console.log(response))
|
|
||||||
.catch(this.dropError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addItemToService(plugin, id) {
|
sendItemLive(plugin, id): Observable<any> {
|
||||||
this.http.get('http://localhost:4316/' + plugin + '/add', buildNumberParams(id))
|
return this.http.get(`${this.apiURL}/${plugin}/live?id=${id}`);
|
||||||
.toPromise()
|
}
|
||||||
.then(response => console.log(response))
|
|
||||||
.catch(this.dropError);
|
addItemToService(plugin, id): Observable<any> {
|
||||||
|
return this.http.get(`${this.apiURL}/${plugin}/add?id=${id}`);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user