Exemple #1
0
    def __init__(self, *kwargs):
        if len(kwargs) > 0:
            client = kwargs[0]
        if not isinstance(client, httplib2.Http):
            from api.google import authenticate
            try:
                client = authenticate()
            except:
                raise GscConfigError(
                    'Make sure that CLIENT_ID and CLIENT_SECRET is set in config.py'
                )

        self.DATA_FOLDER = config['DATA_FOLDER']
        self.ROW_LIMIT = config['ROW_LIMIT']
        self.client = client
# encoding: utf-8

from api.google_search_console import GscClient

from api.google import authenticate
from api.config import config

client = authenticate(config)
gscservice = GscClient(client)