jeroen-g / flickr
Modern PHP package to make Flickr API calls. Ships with Laravel implementation.
Installs: 45 958
Dependents: 2
Suggesters: 0
Security: 0
Stars: 25
Watchers: 4
Forks: 10
Open Issues: 2
Requires
- php: ^7.4 || ^8.0
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- phpunit/phpunit: ^9.0
- vlucas/phpdotenv: ^5.3
Suggests
- illuminate/support: This package provides a Laravel Service Provider
This package is auto-updated.
Last update: 2024-12-12 22:44:57 UTC
README
Modern PHP package to make Flickr API calls. Ships with Laravel implementation.
Install
Via Composer
$ composer require jeroen-g/flickr
Usage
General
// $key is your Flickr API key. $format is optional, it sets the Flickr response format. $flickr = new JeroenG\Flickr\Flickr(new JeroenG\Flickr\Api($key, $format)); // https://www.flickr.com/services/api/flickr.test.echo.html $echoTest = $flickr->echoThis('helloworld'); // https://www.flickr.com/services/api/flickr.photosets.getList.html $photosets = $flickr->listSets($arrayOfParameters); // Setting up other API requests. See https://www.flickr.com/services/api $result = $flickr->request('flickr.method', $arrayOfParameters);
Laravel
Add the Service Provider and (optionally) the facade to config/app.php:
JeroenG\Flickr\FlickrServiceProvider::class,
'Flickr' => JeroenG\Flickr\FlickrLaravelFacade::class,
This is done automatically in Laravel 5.5 with package discovery.
In your .env file, set a FLICKR_KEY
with your Flickr API key and add the following entry to the config/services.php
file:
'flickr' => [
'key' => env('FLICKR_KEY'),
],
More information on this is found here.
The functions act mostly the same as above, for example:
$echoTest = Flickr::echoThis('helloworld');
Change log
Please see the changelog for more information what has changed recently.
Contributing
Please see contributing for details.
Credits
License
The EUPL License. Please see the License File for more information.