Upgrading all request/responses to JSON-RPC
This commit is contained in:
@ -48,6 +48,18 @@ export function instruct(data = null){
|
||||
}
|
||||
}
|
||||
|
||||
export function getConfig(){
|
||||
return {
|
||||
type: 'PUSHER_GET_CONFIG'
|
||||
}
|
||||
}
|
||||
|
||||
export function getVersion(){
|
||||
return {
|
||||
type: 'PUSHER_GET_VERSION'
|
||||
}
|
||||
}
|
||||
|
||||
export function deliverBroadcast(data = null){
|
||||
return {
|
||||
type: 'PUSHER_DELIVER_BROADCAST',
|
||||
@ -69,6 +81,12 @@ export function sendAuthorization(recipient_connectionid, authorization, me){
|
||||
}
|
||||
}
|
||||
|
||||
export function getRadio(){
|
||||
return {
|
||||
type: 'PUSHER_GET_RADIO'
|
||||
}
|
||||
}
|
||||
|
||||
export function startRadio(uris){
|
||||
return {
|
||||
type: 'PUSHER_START_RADIO',
|
||||
@ -108,4 +126,36 @@ export function addQueueMetadata(tlids = [], from_uri = null){
|
||||
tlids: tlids,
|
||||
from_uri: from_uri
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Snapcast actions
|
||||
* TODO: Figure out how to cleanly split this out to it's own service
|
||||
* but still share the pusher middleware connection
|
||||
**/
|
||||
|
||||
export function getSnapcast(){
|
||||
return {
|
||||
type: 'PUSHER_GET_SNAPCAST',
|
||||
data: {
|
||||
method: 'Server.GetStatus'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function setSnapcastClientVolume(id, muted, percent){
|
||||
return {
|
||||
type: 'PUSHER_SET_SNAPCAST_CLIENT_VOLUME',
|
||||
data: {
|
||||
method: 'Client.SetVolume',
|
||||
params: {
|
||||
id: id,
|
||||
volume: {
|
||||
muted: muted,
|
||||
percent: percent
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user