Adding POC lastfm authorization button

This commit is contained in:
James Barnsley
2017-11-02 21:20:56 +13:00
parent 5abb9c775a
commit 35a61686b3
13 changed files with 847 additions and 270 deletions

View File

@ -45,6 +45,28 @@ const sendRequest = (dispatch, getState, params ) => {
})
}
export function set(data){
return {
type: 'LASTFM_SET',
data: data
}
}
/**
* Handle authorization process
**/
export function authorizationGranted(data){
data.token_expiry = new Date().getTime() + data.expires_in;
return { type: 'LASTFM_AUTHORIZATION_GRANTED', data: data }
}
export function revokeAuthorization(){
return { type: 'LASTFM_AUTHORIZATION_REVOKED' }
}
export function connect(){
return (dispatch, getState) => {