{"size": 822, "ext": "js", "max_stars_repo_path": "src/actions/index.js", "max_stars_repo_name": "drewkiimon/openlife", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/actions/index.js", "max_issues_repo_name": "drewkiimon/openlife", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/actions/index.js", "max_forks_repo_name": "drewkiimon/openlife", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.2162162162, "max_line_length": 62, "alphanum_fraction": 0.6946472019}
import axios from "axios";

export const FETCH_PROPERTY = "FETCH_PROPERTY";
export const FETCH_ENTITY = "FETCH_ENTITY";
export const FETCH_ASSOCIATION = "FETCH_ASSOCIATION";

const ROOT_URL = "https://api.openlattice.com/datastore/edm/";
const TYPE = "/type";

export function fetchProperty() {
  console.log(`${ROOT_URL}property${TYPE}`);
  const request = axios.get(`${ROOT_URL}property${TYPE}`);
  console.log("request", request);
  return {
    type: FETCH_PROPERTY,
    payload: request
  };
}

export function fetchEntity() {
  const request = axios.get(`${ROOT_URL}entity${TYPE}`);

  return {
    type: FETCH_ENTITY,
    payload: request
  };
}

export function fetchAssociation() {
  const request = axios.get(`${ROOT_URL}association${TYPE}`);

  return {
    type: FETCH_ASSOCIATION,
    payload: request
  };
}
