import axios from 'axios'
const client = axios.create({
  baseURL: 'http://localhost:3000',
  json: true
})

async function photosearch(...queries) {
  let resp = await axios.get('http://localhost:3000/search/photos/', {
    params: { queries },
    paramsSerializer: {
      indexes: true, // use brackets with indexes
    }
  })
  console.log(resp.data.ratelimit)
  return resp.data
}

export default {
  photosearch
}
