voodooism/randomuser-api-client

Client for randomuser API

1.0.1 2021-08-11 12:06 UTC

This package is auto-updated.

Last update: 2024-12-11 19:41:22 UTC


README

PHP client for https://randomuser.me API

Installation

composer require voodooism/randomuser-api-client

Usage

  $serializer = SerializerBuilder::create()->build();

  $options = new ClientOptions('https://randomuser.me');

  $client = new Client($serializer, new HttpClient(), $options);
  
  //One user
  $user = $this->client->getRandomUser();
  
  //Array of users
  $users = $this->client->getRandomUsers(10);