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-11-11 19:31:52 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);