Skip to content

kos-v/randomuser-client

Repository files navigation

Randomuser.me Client

Build Status Scrutinizer Code Quality

Simple library for getting data from randomuser.me service.

Installation

composer require kosv/randomuser-client:^1.0.0

Example

<?php

use Kosv\RandomUser\Client\{Client, QueryBuilder};
use Kosv\RandomUser\Transport\CurlTransport;

$client = new Client(new CurlTransport());

$query = new QueryBuilder();
$query->setIncludeFields(['name', 'email'])->setPage(3)->setMaxResult(100);

$response = $client->request($query);
$users = $response->getUsers();
$info = $response->getInfo();

About

Client for getting data from randomuser.me service

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages