indigophp/fuel-gravatar

This package is abandoned and no longer maintained. The author suggests using the gravatarphp/gravatar package instead.

Gravatar package to return avatar, profile data, QR-code, VCF

v1.0.0 2014-06-16 18:03 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:28:25 UTC


README

Latest Stable Version Total Downloads License

Fuel package to get Avatar, Profile data, QR-code and VCF from Gravatar

Install

Via Composer

{
    "require": {
        "indigophp/fuel-gravatar": "@stable"
    }
}

Usage

$gravatar = \Gravatar::forge('YOUR@EMAILADDRESS.COM');

// Return plain URL of avatar
$gravatar->avatar();

// Return HTML img tag
$gravatar->avatar(true, array('class' => 'gravatar'));


// Return profile as array
$gravatar->profile();


// Return plain URL of QR code
$gravatar->qr();

// Return HTML img tag
$gravatar->qr(true, array('class' => 'gravatar'));


// Return plain URL of VCF
$gravatar->vcf();

// Return HTML anchor tag
$gravatar->vcf(true, 'Link to VCF', array('class' => 'gravatar'));

Configuration

  • protocol (http | https | null): use https or http. Leaving unset or setting to null means \Input::protocol() will be used.
  • size (integer | null): Size of avatar (1-2048 px) or QR-code (1-500 px). The default value is 80px.
  • default: Default picture in case of none found (Values: 404, mm, identicon, monsterid, wavatar, retro, blank, URL)
  • force (true | false): Return the default image, even if the user is found
  • rating ( G | PG | R | X): Image rating. See this link
  • format ( xml, json, php): Format of returned data from server
  • auto ( true | false): Autoformat response
  • callback (string): Function wrapped around JSON result

Credits

License

The MIT License (MIT). Please see License File for more information.