PHPackages                             lildude/phpsmug - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. lildude/phpsmug

ActiveLibrary[API Development](/categories/api)

lildude/phpsmug
===============

A simple object orientated wrapper for the SmugMug API v2

4.2.0(1y ago)4460.3k↓50%15[4 PRs](https://github.com/lildude/phpSmug/pulls)MITPHPPHP &gt;=8.1.0CI failing

Since Dec 3Pushed 1mo ago9 watchersCompare

[ Source](https://github.com/lildude/phpSmug)[ Packagist](https://packagist.org/packages/lildude/phpsmug)[ Docs](https://lildude.github.io/phpSmug/)[ GitHub Sponsors](https://github.com/lildude)[ RSS](/packages/lildude-phpsmug/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (24)Used By (0)

phpSmug
=======

[](#phpsmug)

[![Coverage Status](https://camo.githubusercontent.com/787e58d9ab958ce290b9c0e7ae01cb759086fd787da10a4504208159934769e2/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6c696c647564652f706870536d75672f62616467652e7376673f6272616e63683d6d61696e26736572766963653d676974687562)](https://coveralls.io/github/lildude/phpSmug?branch=main) [![Test Status](https://github.com/lildude/phpSmug/workflows/Run%20Tests/badge.svg)](https://github.com/lildude/phpSmug/workflows/Run%20Tests/badge.svg)

phpSmug is a simple object orientated wrapper for the new SmugMug API v2, written in PHP.

The intention of this class is to allow PHP application developers quick and easy interaction with the SmugMug API, without having to worry about the finer details of the API.

Not already a SmugMug user? Here, have a **$5 discount** off your first year on me by [registering](https://secure.smugmug.com/signup.mg?Coupon=2ZxFXMC19qOxU) using this code:

**[2ZxFXMC19qOxU](https://secure.smugmug.com/signup.mg?Coupon=2ZxFXMC19qOxU)**

The development of phpSmug takes place in my free time. If you find phpSmug useful and found it has saved you a lot of time, consider sponsoring this project.

---

**Note: Due to significant changes in the SmugMug API, phpSmug 4.0.0 and later is not backwardly compatible with the SmugMug API v1.x.x releases.**

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1.0,
- [Guzzle 7](https://github.com/guzzle/guzzle) library and the [Guzzle OAuth1 Subscriber](https://github.com/guzzle/oauth-subscriber),
- (optional) [PHPUnit](https://phpunit.de/) to run tests.

Installation
------------

[](#installation)

The recommended method of installing phpSmug is using [Composer](http://getcomposer.org). If you have Composer installed, you can install phpSmug and all its dependencies from within your project directory:

```
composer require lildude/phpsmug
```

Alternatively, you can add the following to your project's `composer.json`:

```
{
    "require": {
        "lildude/phpsmug": "^4.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 phpSmug Client
---------------------------------

[](#basic-usage-of-the-phpsmug-client)

`phpSmug` follows the PSR-1, PSR-2 and PSR-4 conventions, which means you can easily use Composer's [autoloading](https://getcomposer.org/doc/01-basic-usage.md#autoloading) to integrate `phpSmug` into your projects.

```
