Address namespace contains methods that generate strings related to the address entity.
{{address.cityPrefix()}}
- Generates randomly the City Prefix, e.g. "North".
{{address.citySuffix()}}
- Generates randomly the City Suffix, e.g. "chester".
{{address.country()}}
- Generates randomly the Country name, e.g. "Singapore".
{{address.countryCode()}}
- Generates randomly the Country code, e.g. "YE".
{{address.county()}}
- Generates randomly the County, e.g. "Berkshire".
{{address.latitude()}}
- Generates randomly the Latitude, e.g. "22.7851".
{{address.longitude()}}
- Generates randomly the Longitude, e.g. "-92.5442".
{{address.secondaryAddress()}}
- Generates randomly the Secondary Address, e.g. "Apt. 228".
{{address.state()}}
- Generates randomly the State, e.g. "Massachusetts".
{{address.stateAbbr()}}
- Generates randomly the State Abbr, e.g. "IN".
{{address.streetName()}}
- Generates randomly the Street Name, e.g. "Emmerich Haven".
{{address.streetPrefix()}}
- Generates randomly the Street Prefix, e.g. "a".
{{address.streetSuffix()}}
- Generates randomly the Street Suffix, e.g. "Creek".
{{address.zipCode()}}
- Generates randomly the Zip Code, e.g. "21302-7567".
The example of a template usage:
{
"someAddress": {
"cityPrefix": "{{address.cityPrefix()}}",
"citySuffix": "{{address.citySuffix()}}",
"country": "{{address.country()}}",
"countryCode": "{{address.countryCode()}}",
"county": "{{address.county()}}",
"latitude": "{{address.latitude()}}",
"longitude": "{{address.longitude()}}",
"secondaryAddress": "{{address.secondaryAddress()}}",
"state": "{{address.state()}}",
"stateAbbr": "{{address.stateAbbr()}}",
"streetName": "{{address.streetName()}}",
"streetPrefix": "{{address.streetPrefix()}}",
"streetSuffix": "{{address.streetSuffix()}}",
"zipCode": "{{address.zipCode()}}"
}
}
© Fake.rest 2019 - 2020