lildude / phpzenfolio
A simple object orientated wrapper for the Zenfolio API
Fund package maintenance!
lildude
Requires
- php: >=5.6.0
- guzzlehttp/guzzle: ~6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ~5.0
- satooshi/php-coveralls: dev-master
This package is auto-updated.
Last update: 2025-01-22 13:28:04 UTC
README
Note
This project is no longer maintained
If you would like to take over maintenance, please get in touch and we can arrange a transfer of the repo.
phpZenfolio is a simple object orientated wrapper for the Zenfolio API, written in PHP.
The intention of this class is to allow PHP application developers quick and easy interaction with the Zenfolio API, without having to worry about the finer details of the API.
Not already a Zenfolio user? Here, have a $5 discount off your first year on me by registering using this code:
The development of phpZenfolio takes place in my free time. If you find phpZenfolio useful and found it has saved you a lot of time, I'd really appreciate it if you bought me a coffee or two.
Note: phpZenfolio 2.0.0 and later is not backwardly compatible with earlier releases.
Requirements
- PHP >= 5.6.0,
- Guzzle 6 library,
- (optional) PHPUnit, php-coveralls and php-cs-fixer to run tests.
Installation
The recommended method of installing phpZenfolio is using Composer. If you have Composer installed, you can install phpZenfolio and all its dependencies from within your project directory:
$ composer require lildude/phpzenfolio
Alternatively, you can add the following to your project's composer.json
:
{ "require": { "lildude/phpzenfolio": "^2.0" } }
.. and then run composer update
from within your project directory.
If you don't have Composer installed, you can download it using:
$ curl -s http://getcomposer.org/installer | php
Basic Usage of the phpZenfolio Client
phpZenfolio
follows the PSR-1, PSR-2 and PSR-4 conventions, which means you can easily use Composer's autoloading to integrate phpZenfolio
into your projects.
<?php // This file is generated by Composer require_once 'vendor/autoload.php'; $client = new phpZenfolio\Client('My Cool App/1.0 (http://app.com)')); $photoset = $client->LoadPhotoSet(12345, 'Level1');
From the $client
object, you have access to all the Zenfolio API methods.
Documentation
See the docs
directory or http://phpzenfolio.com for more detailed documentation.
Examples
phpZenfolio comes with four examples to help get you on your way.
example-popular.php
illustrates how to obtain the 96 most popular galleries and display their title image linking to each individual gallery.example-login.php
illustrates how to login and display the images in your first photoset or collection.example-user.php
illustrates how to display the first 96 public photos of the specified user's first public photoset found.example-create-photoset.php
illustrates how to create a new gallery photoset in the authenticated user's root photoset group, and upload an image to this gallery.
Need Help or Have Questions?
The best way to get help with implementing phpZenfolio into your projects is to open an issue. This allows you to easily search for other issues where others may have asked to the same questions or hit the same problems and if they haven't, your issue will add to the resources available to others at a later date.
Please don't be shy. If you've got a question, problem or are just curious about something, there's a very good chance someone else is too, so go ahead and open an issue and ask.
Contributing
Found a bug or want to make phpZenfolio even better? Please feel free to open a pull request with your changes, but be sure to check out the CONTRIBUTING.md first for some tips and guidelines. No pull request is too small.
Changes
All notable changes to this project are documented in CHANGELOG.md.
License
All code is licensed under the MIT License and all documentation is licensed under the CC BY 4.0 license.