1 | <?php namespace Simondubois\UnsplashDownloader; |
||
14 | class Unsplash |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * Unsplash application ID from https://unsplash.com/developers |
||
19 | * @var string |
||
20 | */ |
||
21 | private $applicationId = '797a14e918f07f3559643a10f7c9e0de9d8a94262cd0ea0eb4b12c6d0993ed50'; |
||
22 | |||
23 | /** |
||
24 | * Unsplash constructor (start HttpClient) |
||
25 | */ |
||
26 | public function __construct() |
||
32 | |||
33 | /** |
||
34 | * Request APi to get last photos |
||
35 | * @param int $quantity Number of photos to return |
||
36 | * @return string[] Photo download links indexed by IDs |
||
37 | */ |
||
38 | public function allPhotos($quantity) |
||
48 | |||
49 | /** |
||
50 | * Request APi to get last photos in category |
||
51 | * @param int $quantity Number of photos to return |
||
52 | * @param integer $category Category ID |
||
53 | * @return string[] Photo download links indexed by IDs |
||
54 | */ |
||
55 | public function photosInCategory($quantity, $category) |
||
65 | |||
66 | /** |
||
67 | * Request APi to get last featured photos |
||
68 | * @param int $quantity Number of photos to return |
||
69 | * @return string[] Photo download links indexed by ID |
||
70 | */ |
||
71 | public function featuredPhotos($quantity) |
||
92 | |||
93 | /** |
||
94 | * Request APi to get all categories photos |
||
95 | * @return string[] Category names indexed by IDs |
||
96 | */ |
||
97 | public function allCategories() |
||
107 | } |
||
108 |