Skip to main content

Facilities (deprecated)

AFCore.facilities() manages the member's gyms: their facility list, adding and removing a facility, automatic visit monitoring, and nominations for new facilities. It is deprecated but still works: existing apps keep running unchanged, and each call's deprecation warning names its replacement.

New code uses Locations, which does all of this and more: favorites that mix gyms and stores, muting, map and place search, problem reports, and a single view of the member's submissions. Both modules drive the same visit-detection engine, so you can move one screen at a time.

What changes​

  • The member's facility list becomes their favorites: getFavorites(), addFavorite(), removeFavorite(). getFavorites() also returns the locations the member excluded (EXCLUDED), so a list of the member's places keeps FAVORITE and MUTED.
  • Monitoring becomes visit detection: startVisitDetection() / stopVisitDetection().
  • Nominations become nominateLocation(), and their status is read with getMySubmissions().

The full call-by-call table is in Locations: Moving from facilities() and map().

Example​

// Before (deprecated, still works)
val facilities = AFCore.facilities().get()

// After: the member's places, muted or not (EXCLUDED is their blocklist)
val favorites = AFCore.locations().getFavorites()
.filter { it.favoriteType == LocationFavoriteType.FAVORITE || it.favoriteType == LocationFavoriteType.MUTED }

Learn more​

  • Locations for everything facilities() did, and more.
  • API Reference for the deprecated calls and their replacements.
  • Complete migration guides are in AIDE Docs.