Closed mginnard closed 9 years ago
I've just run across this as well.
The documentation ( (https://randomuser.me/documentation#seeds)) notes that
Seeds allow you to always generate the same user (or set of users)
Perhaps there could be a "per user" and "per results" seed?
@intenseagile — Ah, just saw this in the closed issues: https://github.com/RandomAPI/Randomuser.me-Data/issues/26
Hopefully it's something that could change; I'd love to be able to use a per-user seed from a multiple user result, or just moving the per-result seed outside of the first item in the array since that feels like a bug.
Hi @mginnard, @intenseagile
Yeah, #26 basically sums up why it currently isn't possible to implement a per user seed.
Actual behavior: seed is included in the first item in the results array but applies to the entire list of results, rather than the first item. I couldn't find a per-generated-user seed in the response body when making a call like /?results=100.
So the seed that is returned in the 1st result is the seed for regenerating that same set of users (with the same ?results=x
parameter).
If you were to call the API with no parameters and then used the seed of that user to call the API again, it should return the same results.
Hey there!
When requesting multiple users, is there a way to find a per-generated-user
seed
to make a second call that only returns the first item in the results array?If not, would it make sense to move
seed
outside of the first result in the results array?Background — I'm making two calls to your API:
seed
from the first result in the first call to (theoretically) fetch the first user in the list again: https://www.runscope.com/public/03041da1-29a4-4d55-9f08-90098f078340/03093baa-4b6b-4a10-85d1-6f681ba89155Expected behavior: The
seed
in the first result would apply to only that randomly generated user, and making a subsequent call to/?seed={{seed}}
would return that same first user.Actual behavior:
seed
is included in the first item in the results array but applies to the entire list of results, rather than the first item. I couldn't find a per-generated-userseed
in the response body when making a call like/?results=100
.