Completed
Push — master ( c12867...9cb664 )
by Junior
28s
created

src/modules/Example/actions.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 21
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 0
wmc 2
c 0
b 0
f 0
nc 1
mnd 0
bc 0
fnc 2
dl 0
loc 21
rs 10
bpm 0
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A actions.js ➔ ??? 0 10 1
1
import axios from 'axios'
2
import {createAction} from 'redux-actions'
3
4
export const GITHUB_FETCHING = 'modules/Github/FETCHING'
5
export const GITHUB_SUCCESS  = 'modules/Github/SUCCESS'
6
export const GITHUB_ERROR    = 'modules/Github/ERROR'
7
8
const githubFetching = createAction(GITHUB_FETCHING)
9
const githubError    = createAction(GITHUB_ERROR)
10
const githubSuccess  = createAction(GITHUB_SUCCESS)
11
12
export const getUserFromGithub = username => ({
13
    type : [
14
        githubFetching,
15
        githubSuccess,
16
        githubError
17
    ],
18
    payload : {
19
        data : () => axios.get('https://api.github.com/users/' + username)
20
    }
21
})
22