Ultra Only
Request a Cloud PlaceCloud Places are a feature of Ultra subscription that allows you to generate real combinations of address + zip code + city + state + country. You can read more about this here.
If you want to include these cloud generators inside your own custom generators, you can use the following line:
// generator can be: address, city, state, country, zip
let generator = 'address';
await fakeData.getUltraSubscriptionObject.getFakerUltraDefines()[generator].callback();
The above code will return an address name, but it can also return zip codes, city names, states or countries.
Requesting a specific Cloud Place
If you want to request a street name for a specific city, you can pass a seed object to the callback method. The object should have the following form:
let seed = {
city: [], // an array of cities that you want to allow for generation
state: [], // an array of states that you want to allow for generation
country: [], // an array of countries that you want to allow for generation
}
If the values are valid, Fake Data will generate a new place that only matches the requested seed. Below is an example that will request an address name that resides either in San Francisco or Los Angeles:
return await fakeData.getUltraSubscriptionObject.getFakerUltraDefines().address.callback({
city: ['Los Angeles', 'San Francisco']
});