{"size": 577, "ext": "js", "max_stars_repo_path": "App/Services/Api.js", "max_stars_repo_name": "HalakVachhani/ReduxSaga", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "App/Services/Api.js", "max_issues_repo_name": "HalakVachhani/ReduxSaga", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "App/Services/Api.js", "max_forks_repo_name": "HalakVachhani/ReduxSaga", "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": 16.9705882353, "max_line_length": 81, "alphanum_fraction": 0.5788561525}
import apisauce from 'apisauce'

const createHome = (baseURL = 'https://jsonplaceholder.typicode.com/photos') => {

    const api = apisauce.create({
        baseURL,
        timeout: 120000
    })

    const getCocktails = () => api.get()

    return {
        getCocktails,
    }
}

const createPost = (baseURL = 'https://jsonplaceholder.typicode.com/posts') => {

    const api = apisauce.create({
        baseURL,
        timeout: 120000
    })

    const getPosts = () => api.get()

    return {
        getPosts,
    }
}

export default {
    createHome,
    createPost
}