Fuel package to get Avatar, Profile data, QR-code and VCF from Gravatar
Via Composer
{
"require": {
"indigophp/fuel-gravatar": "@stable"
}
}
$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'));
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 foundrating
( G | PG | R | X): Image rating. See this linkformat
( xml, json, php): Format of returned data from serverauto
( true | false): Autoformat responsecallback
(string): Function wrapped around JSON result
The MIT License (MIT). Please see License File for more information.