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

52 lines
773 B
JavaScript
Raw Normal View History

2016-10-27 16:58:11 +13:00
/**
* Actions and Action Creators
**/
export function setConfig( config ){
return {
type: 'PUSHER_SET_CONFIG',
config: config
}
}
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
}
}