Skip to content
darwin-8Public

About

php package for getavataaar

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Avataaars

Uses getavataaars service and provides interface for work with avataaars.io api.

This package allows you :

  • Generate random styles.
  • Generate styles with selected options.
  • Generate styles for gender.

Installation

Dependencies:

Installation:

- Require the package via Composer

composer require darwin-8/avataaar

Usage

Just make Avataaar instance and asc get() method to get random img (string)

$avataaar = new \Avataaar\Avataaar(['host' => 'https://avataadfars.io']);

$avataaar->get();

You can use only() and except() methods to set styles you want, or don`t want to see in img. Dont forget use get() method then!

$avataaar = new \Avataaar\Avataaar(['host' => 'https://avataadfars.io']);

$avataaar->only(['topType' => ["ShortHairDreads01", "ShortHairDreads02", "ShortHairFrizzle"]])
         ->except(['topType' => ["ShortHairDreads02"]])
         ->get();

For addition you can use girl() and guy() methods to set styles for girl or boy. Dont forget use get() method then!

$avataaar = new \Avataaar\Avataaar(['host' => 'https://avataadfars.io']);

$avataaar->girl()->only(['skinColor' => ['Brown']])->get();

About

php package for getavataaar

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages