Skip to content

📷 phpZenfolio is a PHP wrapper class for the Zenfolio API

License

Notifications You must be signed in to change notification settings

lildude/phpZenfolio

Repository files navigation

phpZenfolio

Coverage Status Test Status

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:

4Y5-2ZY-2A8

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.

Buy me a Coffee


Note: phpZenfolio 2.0.0 and later is not backwardly compatible with earlier releases.

Requirements

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.

About

📷 phpZenfolio is a PHP wrapper class for the Zenfolio API

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages