# Path: speculator/utils/date.py
# def date_to_delorean(year, month, day):
# def date_to_epoch(year, month, day):
# def now_delorean():
# def shift_epoch(delorean, direction, unit, count):
# def generate_epochs(delorean, direction, unit, count):
# def get_end_start_epochs(year, month, day, direction, unit, count):


import logging
import requests
from speculator.utils import date

    Args:
        json: JSON data as a list of dict dates, where the keys are
            the raw market statistics.
        attr: String of attribute in JSON file to collect.

    Returns:
        List of values of specified attribute from JSON
    """
    res = [json[entry][attr] for entry, _ in enumerate(json)]
    logger.debug('{0}s (from JSON):\n{1}'.format(attr, res))
    return res

def get_json_shift(year, month, day, unit, count, period, symbol):
    """ Gets JSON from shifted date by the Poloniex API

    Args:
        year: Int between 1 and 9999.
        month: Int between 1 and 12.
        day: Int between 1 and 31.
        unit: String of time period unit for count argument.
            How far back to check historical market data.
            Valid values: 'hour', 'day', 'week', 'month', 'year'
        count: Int of units.
            How far back to check historical market data.
        period: Int defining width of each chart candlestick in seconds.
        symbol: String of currency pair, like a ticker symbol.

    Returns: JSON, list of dates where each entry is a dict of raw market data.
    """

# Path: speculator/utils/date.py
# def date_to_delorean(year, month, day):
# def date_to_epoch(year, month, day):
# def now_delorean():
# def shift_epoch(delorean, direction, unit, count):
# def generate_epochs(delorean, direction, unit, count):
# def get_end_start_epochs(year, month, day, direction, unit, count):


# Path: speculator/utils/poloniex.py
import logging
import requests
from speculator.utils import date


    Args:
        json: JSON data as a list of dict dates, where the keys are
            the raw market statistics.
        attr: String of attribute in JSON file to collect.

    Returns:
        List of values of specified attribute from JSON
    """
    res = [json[entry][attr] for entry, _ in enumerate(json)]
    logger.debug('{0}s (from JSON):\n{1}'.format(attr, res))
    return res

def get_json_shift(year, month, day, unit, count, period, symbol):
    """ Gets JSON from shifted date by the Poloniex API

    Args:
        year: Int between 1 and 9999.
        month: Int between 1 and 12.
        day: Int between 1 and 31.
        unit: String of time period unit for count argument.
            How far back to check historical market data.
            Valid values: 'hour', 'day', 'week', 'month', 'year'
        count: Int of units.
            How far back to check historical market data.
        period: Int defining width of each chart candlestick in seconds.
        symbol: String of currency pair, like a ticker symbol.

    Returns: JSON, list of dates where each entry is a dict of raw market data.
    """

    epochs = date.get_end_start_epochs(year, month, day, 'last', unit, count)