Commit bf208a27 authored by Eyad Hasan's avatar Eyad Hasan
Browse files

So it does look like we will need to be making some changes to the data model,...

So it does look like we will need to be making some changes to the data model, I'm not sure yet, so it might be a delete it all, then start from scratch.  I'll have more time to mess with this weekend, hopefully I can have this done soon
parent d022e117
......@@ -6,6 +6,7 @@ use_frameworks!
target 'WhatsOpen' do
pod 'RealmSwift'
#pod 'ObjectMapper+Realm', '~> 0.2'
#pod 'Segmentio', '~> 2.1'
......
// This file was generated by json2swift. https://github.com/ijoshsmith/json2swift
import Foundation
//import RealmSwift
import RealmSwift
//
// MARK: - Data Model
//
......
......@@ -7,6 +7,7 @@
//
import UIKit
import Foundation
class SRCTNetworkController: NSObject {
//Use this for testing with the new API, might make it possible to get stuff moving pre official release
......@@ -15,7 +16,7 @@ class SRCTNetworkController: NSObject {
//https://whatsopen.gmu.edu/api/facilities/?format=json
public static func performDownload(completion: @escaping (_ result: Array<Facility>) -> Void) {
let requestURL: NSURL = NSURL(string: "https://whatsopen.dhaynes.xyz/api/schedules/?format=json")!
let requestURL: NSURL = NSURL(string: "https://whatsopen.dhaynes.xyz/api/facilities/?format=json")!
let urlRequest: NSMutableURLRequest = NSMutableURLRequest(url: requestURL as URL)
let session = URLSession.shared
let task = session.dataTask(with: urlRequest as URLRequest) {
......@@ -53,3 +54,4 @@ class SRCTNetworkController: NSObject {
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment