RealmSwiftSFRestaurantData 0.5

RealmSwiftSFRestaurantData 0.5

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Nov 2016
SPMSupports SPM

Maintained by Adam Fish.



  • By
  • Adam Fish

RealmSwiftSFRestaurantData

Prebuilt Realm dataset composed of San Francisco restaurant scores for Realm Swift

Data Source

Data Model

Object subclasses corresponding to the data model are included in the objects folder.

Data model structure:

  • ABFRestaurantObject
    • businessId: String (primary key)
    • name: String
    • address: String
    • city: String
    • state: String
    • postalCode: String
    • latitude: Double
    • longitude: Double
    • phoneNumber: String
    • violations: List<ABFViolationObject>()
    • inspections: List<ABFInspectionObject>()

  • ABFInspectionObject
    • restaurant: ABFRestaurantObject
    • score: Int
    • date: NSDate
    • type: ABFInspectionType

  • ABFViolationObject
    • restaurant: ABFRestaurantObject
    • date: NSDate
    • violationDescription: String

Installation

From your project:

let realm = Realm(path: ABFRestaurantScoresPath())

let restaurants = realm.objects(ABFRestaurantObject)

Demo

An example project that uses RealmSwiftSFRestaurantData is provided in the ABFRealmSearchViewController repo. To install follow the instructions provided.