NPM Module to get an image from two different values

Didn’t work.

That is a TypeError. Try checking the docs again.

Fixed it by doing:

require('isomorphic-fetch');

const APP_ACCESS_KEY = ''
const APP_SECRET= ''

const Unsplash = require('unsplash-js').default;
const toJson = require('unsplash-js').toJson;

const unsplash = new Unsplash({ accessKey: APP_ACCESS_KEY });

unsplash.search.photos("Doggo", 1, 10)
  .then(toJson)
  .then(json => {
    console.log(json)
  });
1 Like