Random user

Generated placeholder people with names and pictures.

  • Web
  • Since 0.2.0
  • addon
  • random
  • people
  • names
  • placeholder
  • web
  • data

Open in TuneToys

Random user as the Patch draws it, at default values: inlets on the left, outlets on the right.

Random user fetches made-up people from randomuser.me: names, places, e-mail addresses and portrait pictures. It needs no key. The people are generated; none of them is real.

What it does#

The node is generated from the randomuser addon manifest. It requests GET https://randomuser.me/api/ with its parameters and runs it like a Web request. response is JSON with a results list of people and an info block with the seed used.

With trigger cabled each trigger asks; otherwise a change on a cabled parameter port does; with no cable at all it asks once at start.

A Toy using this node requires the network and the randomuser addon, enabled in Settings → Addons.

When to use it#

Use it for playful data: name the voices of a choir, place a sound on a map, or test a data chain with realistic-looking values.

Ports#

PortDirectionSignalLanes
triggerInputData (trigger)1
resultsInputData (integer)1
natInputData (string)1
seedInputData (string)1
incInputData (string)1
responseOutputData (json)1
statusOutputData (integer)1
errorOutputData (string)1
doneOutputData (trigger)1

Parameters#

ParameterLabelRangeDefaultUnitScaleNotes
resultsResults1 to 1001linearPeople per request, 1 to 100. Used while the port has no cable.
  • nat: text.
  • seed: text.
  • inc: text.

Results (results)#

How many people one request returns, 1 to 100.

Nationalities, seed and fields#

The nat field limits nationalities (comma-separated codes such as us,gb,fr); the seed field makes the same request return the same people; the inc field lists the fields to include, such as name,location,picture. Each is used while its port has no cable and left out when empty.

Tips#

  • A fixed seed makes a piece repeatable, like a seeded Random.
  • Pick a first name with Convert and path /results/0/name/first.

See also#

Random, Convert, Console log, Data cables.

Help patches

Each help patch is an ordinary Toy that teaches one idea. The diagram shows the Patch; the preview shows its Frame. Open it in TuneToys to play and edit it.

1. A random name

beginner Teaches: results

Random user fetches a generated person every ten seconds; Convert picks the first name.

Patch: Cron tick output connected to Random user trigger input. Random user response output connected to Convert value input. Convert value output connected to Console log value input.
Connections as text
  • Cron tick output connected to Random user trigger input
  • Random user response output connected to Convert value input
  • Convert value output connected to Console log value input
  • Results sets how many people each request returns.
  • inc limits the fields to keep each response small.
Frame preview: A random nameFrame “A random name” with 2 elements: text heading, text hint.A RANDOM NAMENeeds the network and the Random User addon enabled. The people are generated, …
Frame preview (static). Controls show their default values.

Open in TuneToys

  • Random Make a random number, integer, boolean, string, colour or choice on each trigger; seeded when a seed is wired.
  • Convert Convert a value to another datatype, optionally picking a field or formatting a string; failures go to error.
  • Console log Write each incoming value to the Console panel with a level and label, rate-limited.

Edit this page on GitHub

esc

↑ ↓ move↩ open⌘↩ new tabesc close