GRPlacesManager

class GRPlacesManager

Undocumented

  • Undocumented

    Declaration

    Swift

    static var shared = GRPlacesManager()
  • Undocumented

    Declaration

    Swift

    let nearbySearch = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=24.86112,67.0734&radius=1000&key=AIzaSyDO71x08kRKx0xK7Xn9utzbaGXsigMF6UI"
  • Undocumented

    Declaration

    Swift

    let radarSearch = "https://maps.googleapis.com/maps/api/place/radarsearch/json?location=24.86112,67.0734&radius=1000&type=cafe&key=AIzaSyDO71x08kRKx0xK7Xn9utzbaGXsigMF6UI"
  • Undocumented

    Declaration

    Swift

    let nextPage = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?pagetoken=PAGE_TOKEN&key=AIzaSyDO71x08kRKx0xK7Xn9utzbaGXsigMF6UI"
  • Undocumented

    Declaration

    Swift

    let byNameSearch = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=24.86112,67.0734&radius=10000&type=cafe&name=Dunkin&key=AIzaSyDO71x08kRKx0xK7Xn9utzbaGXsigMF6UI"
  • Undocumented

    Declaration

    Swift

    let getPhoto = "https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photoreference=PHOTO_REFERENCE&key=AIzaSyDO71x08kRKx0xK7Xn9utzbaGXsigMF6UI"
  • Undocumented

    Declaration

    Swift

    let getMusic = "https://kgsearch.googleapis.com/v1/entities:search?query=ae_dil_hai_mushkil&key=AIzaSyDO71x08kRKx0xK7Xn9utzbaGXsigMF6UI&indent=True&types=MusicRecording&limit=50&prefix=True"
  • Undocumented

    Declaration

    Swift

    let tempPhoto = "https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photoreference=CmRaAAAAKhZxano6N_IOqKJjJz3pyMK84EYOCIKtkpEt_OK8Z1dr7HXL4FLPd-bmUJD7pXzA65X18xvORe2UO3BDA8qWvINoqOn7Yc14M5prMaO-IupPPdHT3rhzUDf1PJVLrm4ZEhBW9MrRmKfQP5uR48volDJJGhTc3AxwCuee2ZnFLb1UCQKTZxtPAQ&key=AIzaSyDO71x08kRKx0xK7Xn9utzbaGXsigMF6UI"
  • Undocumented

    Declaration

    Swift

    var uploadedPlacesList = ""
  • Undocumented

    Declaration

    Swift

    var uploadedPlacesCount = 0
  • Undocumented

    Declaration

    Swift

    var errorDescLocal = ""
  • these properties holds the palces a/c to their type for PlaceVC

    Declaration

    Swift

    var restaurants = [GRPlace]()
  • Undocumented

    Declaration

    Swift

    var companies = [GRPlace]()
  • Undocumented

    Declaration

    Swift

    var publicPlaces = [GRPlace]()
  • Undocumented

    Declaration

    Swift

    var restaurantLastDoc : DocumentSnapshot?
  • Undocumented

    Declaration

    Swift

    var companiesLastDoc : DocumentSnapshot?
  • Undocumented

    Declaration

    Swift

    var publicPlacesLastDoc : DocumentSnapshot?
  • Undocumented

    Declaration

    Swift

    var restaurantsSelectedSubType = GRPlaceSubType.Restaurant
  • Undocumented

    Declaration

    Swift

    var companiesSelectedSubType = GRPlaceSubType.Hospital
  • Undocumented

    Declaration

    Swift

    var publicPlacesSelectedSubType = GRPlaceSubType.ShoppingMall
  • insert places in firebase a/c to origin and radius search

    Declaration

    Swift

    func insertPlaces(origin : CLLocationCoordinate2D, radius : Int, type : GRPlaceSubType, complete : @escaping (_ errorDesc : String?) -> Void)
  • insert places in firebase a/c to origin and radius search

    Declaration

    Swift

    func insertPlacesUsingRadarSearch(origin : CLLocationCoordinate2D, radius : Int, type : GRPlaceSubType, complete : @escaping (_ errorDesc : String?) -> Void)
  • insert the places in firebase

    Declaration

    Swift

    func insertPlaceInDatabase(placeData : JSON, complete : @escaping (_ errorDesc : String?, _ place : GRPlace?) -> Void)
  • Declaration

    Swift

    func insertPlaceFromGoogleToFirebase(placeId : String, complete : @escaping (_ errorDesc : String?, _ place : GRPlace?) -> Void )
  • Undocumented

    Declaration

    Swift

    func checkPlaceExistance(placeId: String, complete : @escaping (_ exist : Bool) -> Void)
  • for getting the places by types

    Declaration

    Swift

    func getPlaceBy(placeId : String, complete : @escaping (_ place : GRPlace?) -> Void )
  • for getting the restaurants (Restaurants main type) by types (firestore not supportted logical OR operator),

    Declaration

    Swift

    func getRestaurantsByTypes(types : [String], complete : @escaping () -> Void )
  • for pagination the restaurants Main type

    Declaration

    Swift

    func getNextRestaurants(types : [String], callback : @escaping () -> Void )
  • for getting the Companies by types (firestore not supportted logical OR operator)

    Declaration

    Swift

    func getCompaniesByTypes(types : [String], complete : @escaping () -> Void )
  • for pagination the companies main type

    Declaration

    Swift

    func getNextCompanies(types : [String], callback : @escaping () -> Void )
  • for getting the public places by types (firestore not supportted logical OR operator) companies

    Declaration

    Swift

    func getPublicPlacesByTypes(types : [String], complete : @escaping () -> Void )
  • for pagination the companies main type

    Declaration

    Swift

    func getNextPublicPlaces(types : [String], callback : @escaping () -> Void )