rossjcooper/numbers-api

numbersapi.com API 的一个由 Guzzle 驱动的 HTTP 客户端。

1.0.0 2020-01-31 16:06 UTC

This package is auto-updated.

Last update: 2024-09-10 20:00:14 UTC


README

numbersapi.com API 的一个由 Guzzle 驱动的 HTTP 客户端。

安装

composer require "rossjcooper/numbers-api"

用法

<?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.

测试

一些简单的单元测试位于 /tests 目录中。

使用 ./vendor/bin/phpunit 运行测试