{"size": 1734, "ext": "js", "max_stars_repo_path": "js/actions/list.js", "max_stars_repo_name": "pmaxit/GREapp", "max_stars_repo_stars_event_min_datetime": "2017-08-07T01:55:16.000Z", "max_stars_repo_stars_event_max_datetime": "2017-10-30T17:05:13.000Z", "max_issues_repo_path": "js/actions/list.js", "max_issues_repo_name": "pmaxit/GREapp", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/actions/list.js", "max_forks_repo_name": "pmaxit/GREapp", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 16.358490566, "max_line_length": 103, "alphanum_fraction": 0.6464821223}

'use strict';

import type {Action} from './types';

export const SET_INDEX = "SET_INDEX";
export const SET_LIMIT = "SET_LIMIT";
<<<<<<< HEAD
export const SET_DATA  = "SET_DATA";
export const INCREASE_LIMIT = "INCREASE_LIMIT";
export const PUSH_ITEM = "PUSH_ITEM"
import axios from 'axios';


export function fetchData2(){
	let promise = axios.get('https://raw.githubusercontent.com/adambom/dictionary/master/dictionary.json')
	return function(dispatch){
		promise.then((response) => dispatch({
			type: SET_DATA,
			payload: {
				data : response.data
			}
		})).catch((response) => dispatch({
			type:SET_DATA,
			payload:{
				data: response.error
			}
		}))
	}
}



export function fetchData3(itemsRef){
	
	let promise = itemsRef.orderByKey().once('value')

	return function(dispatch){
		promise.then((response) => dispatch({
			type: SET_DATA,
			payload: {
				data : response.val()
			}
		})).catch((response) => dispatch({
			type:SET_DATA,
			payload:{
				data: response.val()
			}
		}))
	}
}


export function fetchData(){
	let data = require('../../data/dict.json')
	return{
		type: SET_DATA,
		payload:{
			data: data
		}
	}
}

export function increaseLimit(incr){
	return{
		type: INCREASE_LIMIT,
		payload:{
			incr: incr
		}
	}
}
export function setLimit(limit){
	return{
		type: SET_LIMIT,
		payload:{
			limit: limit
		}
	}
}

export function pushItem(text){
	
	return{
		type: PUSH_ITEM,
		payload:text
	}
=======

export function setIndex(index:number):Action {
    return {
        type: SET_INDEX,
        payload: {
        	index: index
        }
    }
}

export function setLimit(limit:number){
	return{
		type: SET_LIMIT,
		payload: {
			limit:limit
		}
	}
>>>>>>> c5b126c7dc30437bc787dca7335d35e5af3d6f63
}