Download the PHP package cetteup/unsplash without Composer

On this page you can find all versions of the php package cetteup/unsplash. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package unsplash

unsplash-php

An unofficial PHP wrapper to access the Unsplash API, focused on API call efficiency and ease of use.

Note: This wrapper only supports public actions.

Installation

Unsplash-PHP uses Composer. To use it, require the library

Usage

Configuration

Before you can start making calls to the API, you need to configure the client with your application ID.

API methods

Please refer to the official documentation for more detailed information on the response structures.

Cetteup\Unsplash\HttpClient->user_find($username)

Retrieve public details on a given user.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required
$username string Required

Example


Cetteup\Unsplash\HttpClient->user_portfolio_link($username)

Retrieve a single user’s portfolio link.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required
$username string Required

Example


Cetteup\Unsplash\HttpClient->user_photos($username, $page, $per_page, $order_by, $stats, $resolution, $quantity, $orientation)

Get a list of photos uploaded by a user.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required Note
$username string Required
$page int Opt (Default: 1)
$per_page int Opt (Default: 10 / Maximum: 30)
$order_by string Opt (Default: latest) Accepted values: latest, oldest, popular
$stats bool Opt (Default: false)
$resolution string Opt (Default: days) Accepted values: days
$quantity int Opt (Default: 30)
$orientation string Opt Accepted values: landscape, portrait, squarish

Example


Cetteup\Unsplash\HttpClient->user_likes($username, $page, $per_page, $order_by, $orientation)

Get a list of photos liked by a user.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required Note
$username string Required
$page int Opt (Default: 1)
$per_page int Opt (Default: 10 / Maximum: 30)
$order_by string Opt (Default: latest) Accepted values: latest, oldest, popular
$orientation string Opt Accepted values: landscape, portrait, squarish

Example


Cetteup\Unsplash\HttpClient->user_collections($username, $page, $per_page)

Get a list of collections created by a user.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required
$username string Required
$page int Opt (Default: 1)
$per_page int Opt (Default: 10 / Maximum: 30)

Example


Cetteup\Unsplash\HttpClient->user_statistics($username, $resolution, $quantity)

Retrieve the consolidated number of downloads, views and likes of all user’s photos, as well as the historical breakdown and average of these stats in a specific timeframe.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required Note
$username string Required
$resolution string Opt (Default: days) Accepted values: days
$quantity int Opt (Default: 30 / Minimum: 1 / Maximum: 30)

Example


Cetteup\Unsplash\HttpClient->photo_all($page, $per_page, $order_by)

Get a single page from the list of all photos.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required Note
$page int Opt (Default: 1)
$per_page int Opt (Default: 10 / Maximum: 30)
$order_by string Opt (Default: latest) Accepted values: latest, oldest, popular

Example


Cetteup\Unsplash\HttpClient->photo_find($id)

Retrieve a single photo.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required
$id string Required

Example


Cetteup\Unsplash\HttpClient->photo_random($params)

Retrieve a single random photo, given optional filters.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required
$params array Opt

Example


Cetteup\Unsplash\HttpClient->photo_statistics($id, $resolution, $quantity)

Retrieve total number of downloads, views and likes of a single photo, as well as the historical breakdown of these stats in a specific timeframe.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required Note
$id string Required
$resolution string Opt (Default: days) Accepted values: days
$quantity int Opt (Default: 30 / Minimum: 1 / Maximum: 30)

Example


Cetteup\Unsplash\HttpClient->photo_download($id)

Track a photo download.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required
$id string Required

Example


Cetteup\Unsplash\HttpClient->search_photos($search, $page, $per_page, $order_by, $content_filter, $collections, $color, $orientation)

Get a single page of photo results for a query.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required Note
$search string Required Multiple search terms need to be separated by `,,or+`
$page int Opt (Default: 1)
$per_page int Opt (Default: 10 / Maximum: 30)
$order_by string Opt (Default: relevant) Accepted values: latest, relevant
$content_filter string Opt (Default: low) Accepted values: low, high
$collections string Opt Multiple IDs need to be comma-separated
$color string Opt Accepted values: black_and_white, black, white, yellow, orange, red, purple, magenta, green, teal, and blueblack_and_white, black, white, yellow, orange, red, purple, magenta, green, teal, blue
$orientation string Opt Accepted values: landscape, portrait, squarish

Example


Cetteup\Unsplash\HttpClient->search_collections($search, $page, $per_page)

Get a single page of collection results for a query.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required Note
$search string Required Multiple search terms need to be separated by `,,or+`
$page int Opt (Default: 1)
$per_page int Opt (Default: 10 / Maximum: 30)

Example


Cetteup\Unsplash\HttpClient->search_users($search, $page, $per_page)

Get a single page of user results for a query.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required Note
$search string Required Multiple search terms need to be separated by `,,or+`
$page int Opt (Default: 1)
$per_page int Opt (Default: 10 / Maximum: 30)

Example


Cetteup\Unsplash\HttpClient->collection_all($page, $per_page)

Get a single page from the list of all collections.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required
$page int Opt (Default: 1)
$per_page int Opt (Default: 10 / Maximum: 30)

Example


Cetteup\Unsplash\HttpClient->collection_featured($page, $per_page)

Get a single page from the list of featured collections.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required
$page int Opt (Default: 1)
$per_page int Opt (Default: 10 / Maximum: 30)

Example


Cetteup\Unsplash\HttpClient->collection_find($id)

Retrieve a single collection.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required Note
$id int Required

Example


Cetteup\Unsplash\HttpClient->collection_photos($id, $page, $per_page, $orientation)

Retrieve a collection’s photos.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required Note
$id int Required
$page int Opt (Default: 1)
$per_page int Opt (Default: 10 / Maximum: 30)
$orientation string Opt Accepted values: landscape, portrait, squarish

Example


Cetteup\Unsplash\HttpClient->collection_related($id)

Retrieve a list of related collections.

Note: You need to instantiate an httpclient object first

Arguments

Argument Type Opt/Required
$id int Required

Example


Cetteup\Unsplash\HttpClient->stats_total()

Get a list of stats for all of Unsplash.

Note: You need to instantiate an httpclient object first

Example


Cetteup\Unsplash\HttpClient->stats_month()

Get the overall Unsplash stats for the past 30 days.

Note: You need to instantiate an httpclient object first

Example


All versions of unsplash with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
guzzlehttp/guzzle Version ~6.2
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cetteup/unsplash contains the following files

Loading the files please wait ....