vhin0210/avatars.adorable.io-php

此包的最新版本(dev-master)没有可用的许可信息。

PHP 库,用于获取 avatars.adorable.io 头像

dev-master 2017-12-22 02:55 UTC

This package is not auto-updated.

Last update: 2024-09-29 04:37:12 UTC


README

这是一个简单的 PHP 库,可以从 avatars.adorable.io 获取头像。

通过 Composer 安装

composer require vhin0210/avatars.adorable.io-php

如何使用

// Create the instance
$avatars_adorable_io = new \AvatarsAdorableIOPHP\AvatarsAdorableIO();

// Get the auto generated image base on your input with specific size.
$image = $avatars_adorable_io->getAutoGenerated(100, 'vhin0210');

// Get avatar face by specific features
$image = $avatars_adorable_io->getAvatarFace('eyes1', 'nose2', 'mouth3', 'ff0000'); // red color

// Get possible features values
$features = $avatars_adorable_io->getAvatarFeaturesList();