{"size": 621, "ext": "js", "max_stars_repo_path": "client/src/api/UnsplashApi.js", "max_stars_repo_name": "Cecily2/travel-goals", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/api/UnsplashApi.js", "max_issues_repo_name": "Cecily2/travel-goals", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/src/api/UnsplashApi.js", "max_forks_repo_name": "Cecily2/travel-goals", "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": 31.05, "max_line_length": 123, "alphanum_fraction": 0.5619967794}
import fetch from 'isomorphic-fetch';

class UnsplashApi {
        static searchPhotos(location) {

            return fetch(`https://api.unsplash.com/search/photos?query=${location}&per_page=6`,
            {
                method: "GET",
                headers: { 'Authorization': "Client-ID 3cab4e810d3931b39f6c3e501568db2d820e1f108c73f01baf15e6d5450dbb92" },
                mode: "cors"
            }).then(response => response.json())
            .then(response => {
                return response
            })
            .catch(error => console.log("Error: ", error))
        }

}

export default UnsplashApi