# -*- coding: utf-8 -*-
import os
import os.path
import datetime
import json
import sqlite3

# Uses python-requests
# http://docs.python-requests.org/en/latest/
import requests
import requests.exceptions

# Look at the X-Bin-Request-Count header and X-Bin-Max-Requests header
# for how many requests you've made, and how many you can make pr. hour.
# You can do any amount of requests pr. second that you want.

# All IDs used with the API are CCP IDs (Except killmail IDs, which can be
# internally set, but they are denoted with a - infront (negative numbers))

# If you get an error 403, look at the Retry-After header.

# The API will maximum deliver of 200 killmails.

# Up to 10 IDs can be fetched at the same time, by seperating them with a , (Comma)

# All modifiers can be combined in any order


# Examples of options both for ZKB class and cache classes:
zkb_cache_options_file = {
    'debug': True,
    'cache_time': 1200,
    'cache_type': 'file',
    'cache_dir': './_caches/zkb',
    'use_evekill': True
}

zkb_cache_options_sqlite = {
    'debug': True,
    'cache_time': 1200,
    'cache_type': 'sqlite',
    'cache_file': './_caches/zkb/zkb_cache.db',
    'use_evekill': True
}


class ZKBCacheBase:
    def __init__(self, options: dict=None):