rossjcooper/numbers-api

A Guzzle powered HTTP client for the numbersapi.com API.

1.0.0 2020-01-31 16:06 UTC

This package is auto-updated.

Last update: 2024-11-10 20:26:30 UTC


README

A Guzzle powered HTTP client for the numbersapi.com API.

Installation

composer require "rossjcooper/numbers-api"

Usage

<?php

use Rossjcooper\NumbersAPI\APIClient;

$api = new APIClient();

$randomText = $api->randomTrivia();

echo $randomText; // 97 is the number of different characters that can be used with a standard English Keyboard.

Testing

Some simple unit tests are in the /tests directory.

Run tests with ./vendor/bin/phpunit