# Path: resources/lib/model/apiresponse.py
# class ApiResponse:
#     def __init__(self, name=None, year=None, genre=None, plot=None, posters=None, fanarts=None):
#         if genre is None:
#             genre = []
#         if posters is None:
#             posters = []
#         if fanarts is None:
#             fanarts = {}
# 
#         self.name = name
#         self.year = year
#         self.genre = genre
#         self.plot = plot
#         self.posters = posters
#         self.fanarts = fanarts
# 
#     @classmethod
#     def from_dict(cls, name=None, year=None, genre=None, plot=None, posters=None, fanarts=None, **kwargs):
#         return cls(name, year, genre, plot, posters, fanarts)


import ConfigParser
import json
import os
import urllib2
import dateutil.parser as date_parser
    import xbmcgui
    from xbmcswift2 import xbmcgui
from abcscraper import AbstractScraper
from resources.lib.model.apiresponse import ApiResponse

try:
except ImportError:



class IgdbScraper(AbstractScraper):
    def __init__(self, core):
        AbstractScraper.__init__(self, core)
        self.api_url = 'https://www.igdb.com/api/v1/games/%s'
        self.api_img_url = 'https://res.cloudinary.com/igdb/image/upload/t_%s/%s.jpg'
        self.cover_cache = self._set_up_path(os.path.join(self.base_path, 'art/poster/'))
        self.api_cache = self._set_up_path(os.path.join(self.base_path, 'api_cache/'))

    def name(self):
        return 'IGDB'

    def get_game_information(self, nvapp):
        if self.core.get_setting('api_key_file', str) == "":

# Path: resources/lib/model/apiresponse.py
# class ApiResponse:
#     def __init__(self, name=None, year=None, genre=None, plot=None, posters=None, fanarts=None):
#         if genre is None:
#             genre = []
#         if posters is None:
#             posters = []
#         if fanarts is None:
#             fanarts = {}
# 
#         self.name = name
#         self.year = year
#         self.genre = genre
#         self.plot = plot
#         self.posters = posters
#         self.fanarts = fanarts
# 
#     @classmethod
#     def from_dict(cls, name=None, year=None, genre=None, plot=None, posters=None, fanarts=None, **kwargs):
#         return cls(name, year, genre, plot, posters, fanarts)


# Path: resources/lib/scraper/igdbscraper.py
import ConfigParser
import json
import os
import urllib2
import dateutil.parser as date_parser
    import xbmcgui
    from xbmcswift2 import xbmcgui
from abcscraper import AbstractScraper
from resources.lib.model.apiresponse import ApiResponse


try:
except ImportError:



class IgdbScraper(AbstractScraper):
    def __init__(self, core):
        AbstractScraper.__init__(self, core)
        self.api_url = 'https://www.igdb.com/api/v1/games/%s'
        self.api_img_url = 'https://res.cloudinary.com/igdb/image/upload/t_%s/%s.jpg'
        self.cover_cache = self._set_up_path(os.path.join(self.base_path, 'art/poster/'))
        self.api_cache = self._set_up_path(os.path.join(self.base_path, 'api_cache/'))

    def name(self):
        return 'IGDB'

    def get_game_information(self, nvapp):
        if self.core.get_setting('api_key_file', str) == "":

            return ApiResponse()