{"size": 618, "ext": "js", "max_stars_repo_path": "src/restApi/index.js", "max_stars_repo_name": "pranoppal/SVNIT-Events-Frontend", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/restApi/index.js", "max_issues_repo_name": "pranoppal/SVNIT-Events-Frontend", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/restApi/index.js", "max_forks_repo_name": "pranoppal/SVNIT-Events-Frontend", "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": 20.6, "max_line_length": 72, "alphanum_fraction": 0.642394822}
import axios from 'axios';

const url = 'https://svr-events-flask.herokuapp.com/';
export const getClubsAPI = async payload => {
  const res = await axios.get( url + 'clubs' );
  return res.data;
};


export async function getEventsAPI() {
  const res = await axios.get(url + 'events');
  return res.data;
};

export async function postInsertUserAPI(payload) {
  const res = await axios.post('http://127.0.0.1:5000/' + 'insertUser', 
  {
    payload,
    headers:{
      'Content-Type': 'application/x-www-form-urlencoded',
      'Accept': 'application/json'
    }
  },
  {timeout: 1000},
  );
  return res.data;
};


