__author__ = 'chorton'
import datetime
import logging

from stubhubapi import StubHubAPI
from StubHubInventoryMechanizer import config



# load configuration
config_files = ['./default.settings', './test_settings.config']
args = config.configure(default_config_files=config_files)

logger = logging.getLogger()

def test_event_lookup():
        api = StubHubAPI()

        event_date = datetime.datetime.strptime('12/02/2014', '%m/%d/%Y')
        event_data = api.searchEvents(601, 'Active', 1382, event_date)
        j = event_data.json()
        print 'json %s' % j
        event_id = j['events'][0]['id']
        print 'event id %s' % event_id

test_event_lookup()
