//
//  SDKMethods.swift
//  MultiInstancesApp
//
//  Created by Abdul on 07/03/19.
//  Copyright © 2019 Abdul. All rights reserved.
//

import Foundation

class SDKMethods : NSObject {
    
    var url = NSURL(string: "")
    
    func setContentSubAUrl() {
        //Loading SubBrand-A URL
        let show = ["GeicoMeteor.mp4","Overflowing.mp4","Grandpa.mp4","Hyundai.mp4","Researcher.mp4","Walrus.mp4","GeicoMeteor.mp4","geicoHumpDay.mp4","GeicoPig.mp4","GeicoSpy.mp4","CleaningCrew.mp4","Geico2.mp4","Geico4.mp4","Geico5.mp4","GeicoSoapOpera.mp4"]
        let random = show[Int(arc4random_uniform(UInt32(show.count)))]
        url = NSURL(string: "http://www.nielsenonlinesupport.com/colin/sdk3/assets/\(random)")
    }
    func setContentSubBUrl() {
        //Loading SubBrand-B URL
        let show = ["GeicoMeteor.mp4","Overflowing.mp4","Grandpa.mp4","Hyundai.mp4","Researcher.mp4","Walrus.mp4","GeicoMeteor.mp4","geicoHumpDay.mp4","GeicoPig.mp4","GeicoSpy.mp4","CleaningCrew.mp4","Geico2.mp4","Geico4.mp4","Geico5.mp4","GeicoSoapOpera.mp4"]
        let random = show[Int(arc4random_uniform(UInt32(show.count)))]
        url = NSURL(string: "http://www.nielsenonlinesupport.com/colin/sdk3/assets/\(random)")
    }
    func loadChannelInfo() -> [String : Any] {
        //Loading Channel Info.
        let strUrl : String = (url?.absoluteString)!
        let channel = [ "channelName" : "ChannelTitle",
                        "mediaURL" : strUrl] as [String : Any]
        return channel
    }
    func loadStaticMaster() -> [String : Any] {
        //Loading Static data
        let staticData =
        [
            "type": "static",
            "section": "MasterBrand",
            "segA": "segmentA",
            "segB": "segmentB",
            "segC": "segmentC"
        ]
        return staticData
    }
    func loadContentMaster() -> [String : Any] {
        //Loading Master Content data
        let content = [
            "type":"content",
            "assetid":"G77777",
            "length":"3600",
            "program":" The Best of Geico ",
            "segB":"CustomSegmentValueB",
            "segC":"segmentC",
            "title":"S1,E3",
            "airdate":"20190221 10:00:00",
            "isfullepisode":"y",
            "adloadtype":"2",
            "optout":""] as [String : Any]
        
        return content
    }
    func loadStaticSubbrandA() -> [String : Any] {
        //Loading Static data of SubBrand-A
        let staticData =
        [
            "type": "static",
            "section":"SubBrand-A",
            "segA": "segmentA",
            "segB": "segmentB",
            "segC": "segmentC"
        ]
        return staticData
    }
    func loadContentSubA() -> [String : Any] {
        //Loading Content of data SubBrand-A
        let content = [
            "type":"content",
            "assetid":"G77777",
            "length":"3600",
            "program":" The Best of Geico ",
            "segB":"CustomSegmentValueB",
            "segC":"segmentC",
            "title":"S1,E5",
            "airdate":"20190221 10:00:00",
            "isfullepisode":"y",
            "adloadtype":"2",
            "optout":""] as [String : Any]
        return content
    }
    func loadStaticSubbrandB() -> [String : Any] {
        //Loading Static data of SubBrand-B
        let staticData =
        [
            "type": "static",
            "section":"SubBrand-B",
            "segA": "segmentA",
            "segB": "segmentB",
            "segC": "segmentC"
        ]
        return staticData
    }
    func loadContentSubB() -> [String : Any] {
        //Loading Content data of SubBrand-B
        let content = [
            "type":"content",
            "assetid":"G77777",
            "length":"3600",
            "program":" The Best of Geico ",
            "segB":"CustomSegmentValueB",
            "segC":"segmentC",
            "title":"S1,E4",
            "airdate":"20190221 10:00:00",
            "isfullepisode":"y",
            "adloadtype":"2",
            "optout":""] as [String : Any]
        return content
    }
}
