<commit_before>
# phpSmug

[![Coverage Status](https://coveralls.io/repos/lildude/phpSmug/badge.svg?branch=master&service=github)](https://coveralls.io/github/lildude/phpSmug?branch=master) [![Build Status](https://travis-ci.org/lildude/phpSmug.svg)](https://travis-ci.org/lildude/phpSmug)

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.

**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

* PHP >= 5.5.0,
* [Guzzle 6](https://github.com/guzzle/guzzle) library and the [Guzzle OAuth1 Subscriber](https://github.com/guzzle/oauth-subscriber),
* (optional) [PHPUnit](https://phpunit.de/) and [php-cs-fixer](http://cs.sensiolabs.org/) to run tests.

## Installation

The recommended method of installing phpSmug is using [Composer](http://getcomposer.org) by adding the following to your project's `composer.json`:

```json
{
    "require": {
        "guzzlehttp/oauth-subscriber": "0.3.*"
    }
}
```

If you don't have Composer installed, you can download it using:

```bash
$ curl -s http://getcomposer.org/installer | php
```

.. and then use it to install phpSmug and all dependencies using:

```bash
$ php composer.phar install
```

If you have Composer installed, you can install phpSmug run the following from within your project directory:

```bash
$ composer install
```

## 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.

```php
<?php

// This file is generated by Composer
require_once 'vendor/autoload.php';

// Optional, but definitely nice to have, options
$options = [
    'AppName'   => 'My Cool App/1.0 (http://app.com)',
];
$client = new phpSmug\Client("[YOUR_API_KEY]", $options));
$albums = $client->get('user/[your_username]!albums');
```
<commit_msg>Updating installation directions to use 'composer require lildude/phpsmug'.<commit_after>
# phpSmug

[![Coverage Status](https://coveralls.io/repos/lildude/phpSmug/badge.svg?branch=master&service=github)](https://coveralls.io/github/lildude/phpSmug?branch=master) [![Build Status](https://travis-ci.org/lildude/phpSmug.svg)](https://travis-ci.org/lildude/phpSmug)

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.

**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

* PHP >= 5.5.0,
* [Guzzle 6](https://github.com/guzzle/guzzle) library and the [Guzzle OAuth1 Subscriber](https://github.com/guzzle/oauth-subscriber),
* (optional) [PHPUnit](https://phpunit.de/) and [php-cs-fixer](http://cs.sensiolabs.org/) to run tests.

## 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:

```bash
$ composer require lildude/phpsmug
```

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

```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:

```bash
$ curl -s http://getcomposer.org/installer | php
```

## 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.

```php
<?php

// This file is generated by Composer
require_once 'vendor/autoload.php';

// Optional, but definitely nice to have, options
$options = [
    'AppName'   => 'My Cool App/1.0 (http://app.com)',
];
$client = new phpSmug\Client("[YOUR_API_KEY]", $options));
$albums = $client->get('user/[your_username]!albums');
```

{'fraction_non_alphanumeric': 0.1337980661119856, 'fraction_numerical': 0.00854508657521925, 'mean_word_length': 4.602015113350126, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1128908', 'n_tokens_mistral': 1526, 'n_tokens_neox': 1436, 'n_words': 448}