#!/usr/bin/env python 2.7.12

#=======================================================================================================================================================#
#title           :methods.py
#description     :This collects KPI data from all relevant API sources
#author          :Michael Roberts
#date            :20170316
#version         :0.1
#usage           :python main.py (not CLI)
#notes           :Tweepy version 3.5.0 and pyMongo 3.4.0
#python_version  :2.7.12 |Anaconda 2.3.0 (x86_64)| (default, Jul  2 2016, 17:43:17) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)]
#=======================================================================================================================================================#

from datetime import datetime
from send import SendToGoogleSheets

def main():
    startTime = datetime.now()
    SendToGoogleSheetsMethods = SendToGoogleSheets()
    SendToGoogleSheetsMethods.bounced()
    SendToGoogleSheetsMethods.hooked()
    SendToGoogleSheetsMethods.sessions()
    SendToGoogleSheetsMethods.events()
    SendToGoogleSheetsMethods.social()
    SendToGoogleSheetsMethods.socialref() # *** FINISHED 28.APRIL.2017 *** #
    SendToGoogleSheetsMethods.comparative() # *** FINISHED 28.APRIL.2017 *** #
    SendToGoogleSheetsMethods.mobile()
    SendToGoogleSheetsMethods.stepjockey() # *** UPDATED TO INCLUDE MINI-CHALLENGES 04.MAY.2017 *** #
    print(datetime.now() - startTime)

if __name__ == '__main__':
    try:
        main()
    except KeyboardInterrupt:
        print('\nGoodbye!')
