Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Releases: unsplash/unsplash-js

v7.0.0-beta.1

26 Nov 19:51
Compare
Choose a tag to compare
v7.0.0-beta.1 Pre-release
Pre-release
  • Merge pull request #147 from unsplash/v7.0.0-beta0 88970e0
  • Merge pull request #143 from unsplash/feature/typescript c4e57ca

6.3.0...v7.0.0-beta.1

6.3.0

03 Sep 02:51
01c8942
Compare
Choose a tag to compare

Changes

  • Deprecate photos.photoDownload in favor of photos.trackDownload to better clarify method usage. photoDownload will continue to be supported until version 7.0.

6.2.0

02 Sep 05:31
c9752e7
Compare
Choose a tag to compare

6.2.0

Changes

unsplash.search.photos("nature", 1, 10, { lang: "en" });
unsplash.search.photos("nature", 1, 10, {
  orientation: "landscape",
  color: "brown", // new
  orderBy: "relevant" // new
});
unsplash.search.photos("nature", 1, 10, { contentFilter: "high" });

6.1.0

16 Apr 16:29
3b42053
Compare
Choose a tag to compare
Merge pull request #125 from unsplash/maintenance/brotli-compression

Add note about node-fetch version to enable brotli compression

6.0.0

25 Oct 20:58
Compare
Choose a tag to compare

Changes

  • To better clarify the use of accessKey when initializing, applicationId has been renamed to accessKey:

    // previously
    const unsplash = new Unsplash({
      applicationId: "{APP_ACCESS_KEY}"
    });
    
    // now
    const unsplash = new Unsplash({
      accessKey: "{APP_ACCESS_KEY}"
    });
  • unsplash.photos.getPhotoStats now uses the /photos/:id/statistics endpoint (changelog reference)

  • To support additional filters, the unsplash.search.photos method signature has been changed to support an optional filters object, which currently supports collections and orientation keys.

unsplash.search.photos("nature", 1, 10, { orientation: "landscape", collections: [1,2] })

Removals

6.0 removes deprecated endpoints and parameters to match the changes from the Unsplash API Changelog. Most of these endpoints have been deprecated on the API and removed from unsplash-js documentation for 2+ years.

Removed Method Replacement Reason
unsplash.search.all None This endpoint is undocumented publicly and is highly likely to change in the future. Therefore, we don't recommend anyone use this functionality in their applications.
unsplash.photos.listCuratedPhotos None Curated photos were deprecated in 2017, removed in 2019
unsplash.photos.searchPhotos unsplash.search.photos Replaced by the new search endpoints in 2017
unsplash.photos.uploadPhoto None Removed for legal compatibility
unsplash.collections.listFeaturedCollections unsplash.collections.listCollections Redundant endpoint
unsplash.collections.listCuratedCollections None Curated collections were replaced by collections. Deprecated in 2017, removed in 2019
unsplash.collections.getCuratedCollection unsplash.collections.getCollection Curated collections were replaced by collections. Deprecated in 2017, removed in 2019
unsplash.collections.getCuratedCollectionPhotos unsplash.collections.getCollectionPhotos Curated collections were replaced by collections. Deprecated in 2017, removed in 2019
unsplash.categories.* None Categories were deprecated in 2017 and removed from the API in 2017
Removed Parameter Method Reason
category unsplash.photos.getRandomPhoto Categories were deprecated in 2017 and removed from the API in 2017
w unsplash.photos.getPhoto, unsplash.photos.getRandomPhoto Deprecated in favor of dynamic image URLs
h unsplash.photos.getPhoto, unsplash.photos.getRandomPhoto Deprecated in favor of dynamic image URLs
crop unsplash.photos.getPhoto Deprecated in favor of dynamic image URLs

v4.5.3

13 Mar 18:08
Compare
Choose a tag to compare

Add count param to photos.getRandomPhoto()

Added a count property to photos.getRandomPhoto(), since this property is understood by the API.

Special thanks to @MagicPoulp for his work on this release.

4.5.0

17 Jan 15:20
Compare
Choose a tag to compare

Add orientation param to getRandomPhoto method

When requesting a random photo, it is helpful to specify which orientation you'd like for the photo to be in.

Thanks to @dechuck for his work, and his patience :)

4.4.0

11 Jan 16:42
Compare
Choose a tag to compare

Add per_page query param to search endpoints.

Updated search.all, search.photos, search.users, and search.collections to support a per_page argument. Defaults to 10.

Thanks to @spencerfdavis for his work implementing this feature, and his patience waiting for it to be merged in :)

4.3.0

23 Nov 22:12
Compare
Choose a tag to compare

Add safety check to toJson

In large applications, if you're in the habit of passing promises around, it may be tricky to know whether the response from Unsplash has already been converted to JSON.

This minor update ensures that toJson is idempotent; that is, it can be invoked using its output as input, returning the same thing when it's invoked multiple times.

4.2.0

07 Jul 19:54
Compare
Choose a tag to compare
  • adds universal search endpoints
    • /search
    • /search/photos
    • /search/collections
    • /search/users