PHPackages                             12-stars-media/avy-get - 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. 12-stars-media/avy-get

ActiveLibrary

12-stars-media/avy-get
======================

This package attempts to get an avatar from an email address by checking Google+ and Gravatar.

0.2.0(9y ago)12921MITPHPPHP &gt;=5.5.0

Since Jun 17Pushed 9y ago2 watchersCompare

[ Source](https://github.com/12StarsMedia/avy-get)[ Packagist](https://packagist.org/packages/12-stars-media/avy-get)[ RSS](/packages/12-stars-media-avy-get/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

AvyGet Avatar Getter
====================

[](#avyget-avatar-getter)

This package attempts to get an avatar from an email address by checking the PicasaWeb and Gravatar APIs.

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

[](#requirements)

PHP 5.5 and later.

Composer
--------

[](#composer)

Update your `composer.json`

```
{
  "require": {
    "12-stars-media/avy-get": "0.2.*"
  }
}

```

Followed by `composer install`.

Getting Started
---------------

[](#getting-started)

### To Use PicasaWeb API

[](#to-use-picasaweb-api)

Create app and API key to use Google+ API.

1. Set up a project on the [Google Developer Console](https://console.developers.google.com/project)
2. Enable Google+ API
3. Create a Public API Access key

Set environment variables so that AvyGet can authenticate you with Google's API.

- `API_GOOGLE_APP_NAME` (the name of your project or app)
- `API_GOOGLE_API_KEY` (your API key created in step 3 above)

### Basic Usage

[](#basic-usage)

Instantiate a new instance for each email you need a profile image for:

```
$avyGet = new AvyGet(
  'avyget@example.com', // Email address to find image for
  120                   // Desired image size in pixels (optional)
);

$avatar = $avyGet->url(); // Returns url for image

```

Documentation
-------------

[](#documentation)

### Instantiate AvyGet

[](#instantiate-avyget)

`new AvyGet( string $email [, int $size = 200 ] [, array $services = [] ] );`

Only the email is required, but you can request an avatar in a specific size and also modify what services are used to find avatars.

### Avatar Source Services

[](#avatar-source-services)

Default services and order of preference is:

```
protected $services = [
    'AvyGet\Services\Google',
    'AvyGet\Services\Gravatar',
];

```

More services can be created by extending `AvyGet\Services\ProfilePhotoAbstract` and implementing the `AvyGet\Services\ImageUrlInterface`.

### Methods

[](#methods)

#### resize( int $size )

[](#resize-int-size-)

Returns modified AvyGet instance (i.e. it is chainable).

`$avyGet->resize(150)->url();`

#### url()

[](#url)

Returns the url instantiated with AvyGet or null if no avatar could be found for the provided email.

$avyGet-&gt;url();

#### urlArray( array $sizes )

[](#urlarray-array-sizes-)

Returns an indexed or associative array relative to what to provide it- replaces your size values with the appropriate URLs.

```
$avyGet->urlArray([
  32,
  128,
  512
]);

/**
 * [
 *   'http://www.example.com/image?size=32',
 *   'http://www.example.com/image?size=128',
 *   'http://www.example.com/image?size=512',
 * ]
 */

```

```
$avyGet->urlArray([
  'small'  => 32,
  'medium' => 128,
  'large'  => 512,
]);

/**
 * [
 *   'small'  => 'http://www.example.com/image?size=32',
 *   'medium' => 'http://www.example.com/image?size=128',
 *   'large'  => 'http://www.example.com/image?size=512',
 * ]
 */

```

License
-------

[](#license)

AvyGet is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~311 days

Total

3

Last Release

3367d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae2e73270be4900527f6a571546ad61f98c4300fed8fd2e6f6be63d49ea16568?d=identicon)[TimothyLoyer](/maintainers/TimothyLoyer)

---

Top Contributors

[![tjtedeschi](https://avatars.githubusercontent.com/u/7156770?v=4)](https://github.com/tjtedeschi "tjtedeschi (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/12-stars-media-avy-get/health.svg)

```
[![Health](https://phpackages.com/badges/12-stars-media-avy-get/health.svg)](https://phpackages.com/packages/12-stars-media-avy-get)
```

###  Alternatives

[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

81733.7k](/packages/flow-php-flow)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1225.0k10](/packages/fleetbase-core-api)[chameleon-system/chameleon-base

The Chameleon System core.

1026.5k3](/packages/chameleon-system-chameleon-base)[voidagency/vactory_starter_kit

Vactory is a custom Drupal profile which is developed and released by VOID Agency.

1019.7k](/packages/voidagency-vactory-starter-kit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
