Package: unsplashx
UnsplashXUnsplashXisan extremely simpleUnsplasheXploerer for Pythonwritten in Python Standard LibraryUnsplashXsupports toget Unsplash Source's URL of a photo without the Official Unsplash APIInstallationpipinstallunsplashxQuickstartimportunsplashxunsplashx.source()LicenseUnsplashXhas a BSD-3-Clause license, as found in theLICENSEfile.Documentationunsplashx.statusunsplashx.statusUnsplash API Status URL.unsplashx.changelogunsplashx.changelogUnsplash API Changelog URL.unsplashx.idunsplashx.id(link, verbose=False)Get the identifier given Unsplash share link URL.Get the ID of a photohttps://unsplash.com/photos/{id}Get the username of a userhttps://unsplash.com/@{id}Get the ID of a collectionhttps://unsplash.com/collections/{id}/{name}Parameters:link(str): Unsplash share link URL of a photo, a user, or a collection.verbose(bool, optional): Whether to enable verbose output. Defaults toFalse.Returns:(str): The identifier, that can be the ID of a photo, the username of a user, or the ID of a collection.unsplashx.sourceunsplashx.source(photo=None, user=None, liked=None, collection=None, featured=None, resolution=None, update=None, query=None, verbose=False)Get Unsplash Source download link URL of a photo given the parameters.Get a random photohttps://source.unsplash.com/randomOptionally, limit to a featured selectionhttps://source.unsplash.com/featuredOptionally, specify a sizehttps://source.unsplash.com/{resolution}Optionally, limit to only updaing daily or weeklyhttps://source.unsplash.com/{update}Optionally, limit to matching search termshttps://source.unsplash.com/random?{query}Optionally, narrow the selection furtherhttps://source.unsplash.com/featured/{resolution}/{update}?{query}Get a photohttps://source.unsplash.com/{id}Optionally, specify a sizehttps://source.unsplash.com/{id}/{resolution}Get a random photo from a user's photoshttps://source.unsplash.com/user/{id}Optionally, narrow the selection furtherhttps://source.unsplash.com/user/{id}/featured/{resolution}/{update}Get a random photo from a user's liked photoshttps://source.unsplash.com/user/{id}/likesOptionally, specify a sizehttps://source.unsplash.com/user/{id}/likes/{resolution}Get a random photo from a collection's photoshttps://source.unsplash.com/collection/{id}Optionally, narrow the selection furtherhttps://source.unsplash.com/collection/{id}/{resolution}/{update}Note:Unsplash Source is being deprecated. Existing uses will continue to work, however for new projects use the full Unsplash API.Parameters:photo(str, optional): Unsplash share link URL or the ID of a photo.user(str, optional): Unsplash share link URL or the username of a user.liked(bool, optional): Whether to limit to a user's liked photos. Defaults toFalse.collection(str, optional): Unsplash share link URL or the ID of a collection.featured(bool, optional): Whether to limit to a featured selection. Defaults toFalse.resolution(str, optional): The size of a photo to be set. Formats to{width}x{height}. Defaults toNone.update(str, optional): Whether to limit to only updating daily or weekly. Defaults toFalse.query(str, optional): Comma-separated search terms. Defaults toNone.verbose(bool, optional): Whether to enable verbose output. Defaults toFalse.Returns:(str): Unsplash Source download link URL of a photo.Reference:[1]https://changelog.unsplash.com/deprecations/2021/11/25/source-deprecation.htmlContributingThanks for your interest in contributing toUnsplashX! Please feel free to create a pull request.ChangelogUnsplashX 0.1.0Made Unsplash Source's URL constructor functional