src/api.js
// Search photos using Flickr's API
Search photos using Flickr's API
Search photos using Flickr ' s API
async function searchPhotos(text, params) {
  const data = await flickr('flickr.photos.search', {
    text,
    sort: 'relevance',
    safe_search: 1,
    extras: urlKeys.join(','),
    ...params
  });
  return {
    ...data.photos,
    photo: data.photos.photo.map(photo => ({
      ...photo,
      sizes: getSizes(photo)
    }))
  };
}
async function searchPhotos ( text , params ) { const data = await flickr ( 'flickr.photos.search' , { text , sort : 'relevance' , safe_search : 1 , extras : urlKeys . join ( ',' ) , ... params } ) ; return { ... data . photos , photo : data . photos . photo . map ( photo => ( { ... photo , sizes : getSizes ( photo ) } ) ) } ; }
Search photos using Flickr's API
Search photos using Flickr ' s API