Files
Iris/src/js/services/pusher/actions.js

60 lines
882 B
JavaScript
Raw Normal View History

2016-10-27 16:58:11 +13:00
/**
* Actions and Action Creators
**/
2016-10-31 09:25:15 +13:00
export function setPort( port ){
2016-10-27 16:58:11 +13:00
return {
2016-10-31 09:25:15 +13:00
type: 'PUSHER_SET_PORT',
port: port
2016-10-27 16:58:11 +13:00
}
}
2016-10-28 15:58:07 +13:00
export function changeUsername( username ){
return {
type: 'PUSHER_INSTRUCT',
2016-10-28 15:58:07 +13:00
action: 'change_username',
data: username
}
}
2016-10-27 16:58:11 +13:00
export function connect(){
return {
type: 'PUSHER_CONNECT'
}
}
export function disconnect(){
return {
type: 'PUSHER_DISCONNECT'
}
}
export function performUpgrade(){
return {
type: 'PUSHER_UPGRADING'
}
}
export function getConnectionList(){
return {
type: 'PUSHER_INSTRUCT',
action: 'get_connections'
}
}
export function instruct( action, data = null ){
2016-10-27 16:58:11 +13:00
return {
type: 'PUSHER_INSTRUCT',
action: action,
data: data
2016-10-27 16:58:11 +13:00
}
}
export function debug( call, data = null ){
return {
type: 'PUSHER_DEBUG',
call: call,
data: data
}
2016-10-27 16:58:11 +13:00
}