2017 © Pedro Peláez
 

library avtr-io

API Wrapper for avtr.io

image

jamosaur/avtr-io

API Wrapper for avtr.io

  • Friday, March 31, 2017
  • by jaaaaaaaaaam
  • Repository
  • 1 Watchers
  • 1 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

avtr-io

Latest Version on Packagist ![Software License][ico-license] Build Status ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*1)

API Wrapper for avtr.io, (*2)

Install

Via Composer, (*3)

``` bash $ composer require jamosaur/avtr-io, (*4)


## Usage ``` php require Jamosaur\Avtr; $avtr = new Avtr('James Wallen-Jones'); echo '<img src="' . $avtr->toUrl() . '">';

Available Options

// Construct with email.
$avtr = new Avtr('j.wallen.jones@googlemail.com');

// Construct with name.
$avtr = new Avtr('James Wallen-Jones');

// Construct with initials.
$avtr = new Avtr('JW');

// Image Format. (png, jpg, gif)
$avtr->format(string);

// Setting a first name.
$avtr->firstName(string);

// Setting a last name.
$avtr->lastName(string);

// Setting the letter count. (1, 2)
// Anything below 1 will default to 1.
// Anything above 2 will default to 2.
$avtr->letterCount(int);

// Setting the background colour.
// Values below 0 will default to 0.
// Values above 255 will default to 255.
// Alpha value is 0.0 - 1.0
$avtr->background(r, g, b, a);

// Setting the image size.
// Values below 0 will default to 100
$avtr->size(500);

// Setting rounded corners.
$avtr->roundedCorners(bool);

// Setting Shape. (square, circle)
$avtr->shape(string);

// Setting theme. (material, flat)
$avtr->theme(string);

// Setting text Case. (lower, upper, title)
$avtr->textCase(string);

// Setting text colour.
// Values below 0 will default to 0.
// Values above 255 will default to 255.
// Alpha value is 0.0 - 1.0
$avtr->color(r, g, b, a);

// Setting font weight. (100-900)
// Values below 100 default to 100
// Values above 900 default to 900
$avtr->fontWeight(100);

// Setting font. (open-sans, source-sans-pro, roboto)
$avtr->font(string);

// Return a URL
$avtr->toUrl();

Change log

Please see CHANGELOG for more information on what has changed recently., (*5)

Testing

bash $ composer test, (*6)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*7)

Security

If you discover any security related issues, please email j.wallen.jones@googlemail.com instead of using the issue tracker., (*8)

Credits

License

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

The Versions

31/03 2017

dev-master

9999999-dev https://github.com/jamosaur/avtr-io

API Wrapper for avtr.io

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

jamosaur avtr.io avtr

31/03 2017

v1.0.0

1.0.0.0 https://github.com/jamosaur/avtr-io

API Wrapper for avtr.io

  Sources   Download

MIT

The Requires

  • php ~7.0

 

The Development Requires

jamosaur avtr.io avtr