nominate Facility
Submits a new facility for nomination.
This allows a member to suggest a new facility that is not yet part of the network. The submitted information will be reviewed for potential inclusion. While many parameters are optional, providing more detail increases the likelihood of a successful nomination.
Return
An AFResult indicating whether the nomination was successfully submitted.
Parameters
The name of the facility or club.
The primary street address line.
Optional secondary street address line (e.g., suite, floor).
The city where the facility is located.
The two-letter state or province code.
The postal or ZIP code.
Optional geographical latitude of the facility.
Optional geographical longitude of the facility.
Optional contact phone number for the facility.
Optional contact email address for the facility.
Optional name of a manager or contact person at the facility.
Optional flag indicating if the person nominating is currently a member of the facility.
Optional map for any additional custom data related to the nomination.
Throws
if the submission fails due to a network or server error.
Android (Kotlin)
lifecycleScope.launch {
try {
val result = AFCore.facilities().nominateFacility(
clubName = "Downtown Fitness",
address1 = "123 Main St",
city = "Anytown",
stateCode = "CA",
zipCode = "90210",
currentlyAMember = true
)
if (result.status) {
println("Facility nominated successfully")
} else {
println("Failed to nominate facility: ${result.statusMessage}")
}
} catch (t: Throwable) {
showError("Failed to nominate facility: ${t.message}")
}
}
### iOS (Swift)
```swift
Task {
do {
let result = try await AFCore.shared.facilities().nominateFacility(
clubName: "Downtown Fitness",
address1: "123 Main St",
city: "Anytown",
stateCode: "CA",
zipCode: "90210",
currentlyAMember: true
)
if (result.status) {
print("Facility nominated successfully")
} else {
print("Failed to nominate facility: \(result.statusMessage)")
}
} catch {
print("Failed to nominate facility: \(error.localizedDescription)")
}
}