{"size": 419, "ext": "js", "max_stars_repo_path": "src/components/GetData.js", "max_stars_repo_name": "chuckbot/melisearch-challenge", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/GetData.js", "max_issues_repo_name": "chuckbot/melisearch-challenge", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/GetData.js", "max_forks_repo_name": "chuckbot/melisearch-challenge", "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": 24.6470588235, "max_line_length": 48, "alphanum_fraction": 0.6491646778}
import axios from 'axios';
import Http from './Url';

const searchItem = async query => {
    let url = Http.url + "api/items?q=" + query;
    const response = await axios.get(url);
    return response.data;
}

const getItem = async id => {
    let url = Http.url + "api/items/" + id;
    const response = await axios.get(url);
    return response.data;
}

let getData = { searchItem, getItem };
export default getData;