Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

indigophp-archive/fuel-gravatar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fuel Gravatar

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.