# Path: syncano_cli/parse_to_syncano/config.py
# PARSE_PAGINATION_LIMIT = 1000  # the biggest value parse allows
# 
# Path: syncano_cli/parse_to_syncano/parse/connection.py
# class ParseConnection(object):
# 
#     BASE_URL = 'https://api.parse.com/{url}/'
# 
#     def __init__(self, application_id, master_key):
#         self.application_id = application_id
#         self.master_key = master_key
# 
#     def request(self, url, params=None, headers=None):
#         params = params or {}
#         headers = headers or {}
#         url = self.BASE_URL.format(url=url)
#         headers.update({
#             'X-Parse-Application-Id': self.application_id,
#             'X-Parse-Master-Key': self.master_key,
#             'Content-Type': 'application/json'
#         })
#         response = requests.get(url, params=params, headers=headers)
#         return response.json()
# 
#     def get_schemas(self):
#         return self.request(PARSE_API_MAP['schemas'])['results']
# 
#     def get_class_objects(self, class_name, limit=1000, skip=0, query=None):
#         params = {'limit': limit, 'skip': skip}
#         if query:
#             params.update({'where': json.dumps(query)})
#         return self.request(PARSE_API_MAP['classes'].format(class_name=class_name), params=params)
# 
#     def get_installations(self, skip=0, limit=1000):
#         params = {'limit': limit, 'skip': skip}
#         return self.request(PARSE_API_MAP['installations'], params=params)


import syncano
from syncano_cli.parse_to_syncano.config import PARSE_PAGINATION_LIMIT
from syncano_cli.parse_to_syncano.parse.connection import ParseConnection
            application_id=self.config.get('P2S', 'PARSE_APPLICATION_ID'),
            master_key=self.config.get('P2S', 'PARSE_MASTER_KEY'),
        )

        self._parse = parse_connection
        return self._parse


class SyncanoConnectionMixin(object):

    _syncano = None

    @property
    def syncano(self):
        if self._syncano:
            return self._syncano

        syncano_connection = syncano.connect(
            api_key=self.config.get('P2S', 'SYNCANO_ADMIN_API_KEY'),
            instance_name=self.config.get('P2S', 'SYNCANO_INSTANCE_NAME'),
        )

        self._syncano = syncano_connection
        return self._syncano


class PaginationMixin(object):

    @classmethod
    def get_limit_and_skip(cls):

# Path: syncano_cli/parse_to_syncano/config.py
# PARSE_PAGINATION_LIMIT = 1000  # the biggest value parse allows
# 
# Path: syncano_cli/parse_to_syncano/parse/connection.py
# class ParseConnection(object):
# 
#     BASE_URL = 'https://api.parse.com/{url}/'
# 
#     def __init__(self, application_id, master_key):
#         self.application_id = application_id
#         self.master_key = master_key
# 
#     def request(self, url, params=None, headers=None):
#         params = params or {}
#         headers = headers or {}
#         url = self.BASE_URL.format(url=url)
#         headers.update({
#             'X-Parse-Application-Id': self.application_id,
#             'X-Parse-Master-Key': self.master_key,
#             'Content-Type': 'application/json'
#         })
#         response = requests.get(url, params=params, headers=headers)
#         return response.json()
# 
#     def get_schemas(self):
#         return self.request(PARSE_API_MAP['schemas'])['results']
# 
#     def get_class_objects(self, class_name, limit=1000, skip=0, query=None):
#         params = {'limit': limit, 'skip': skip}
#         if query:
#             params.update({'where': json.dumps(query)})
#         return self.request(PARSE_API_MAP['classes'].format(class_name=class_name), params=params)
# 
#     def get_installations(self, skip=0, limit=1000):
#         params = {'limit': limit, 'skip': skip}
#         return self.request(PARSE_API_MAP['installations'], params=params)


# Path: syncano_cli/parse_to_syncano/migrations/mixins.py
import syncano
from syncano_cli.parse_to_syncano.config import PARSE_PAGINATION_LIMIT
from syncano_cli.parse_to_syncano.parse.connection import ParseConnection

            application_id=self.config.get('P2S', 'PARSE_APPLICATION_ID'),
            master_key=self.config.get('P2S', 'PARSE_MASTER_KEY'),
        )

        self._parse = parse_connection
        return self._parse


class SyncanoConnectionMixin(object):

    _syncano = None

    @property
    def syncano(self):
        if self._syncano:
            return self._syncano

        syncano_connection = syncano.connect(
            api_key=self.config.get('P2S', 'SYNCANO_ADMIN_API_KEY'),
            instance_name=self.config.get('P2S', 'SYNCANO_INSTANCE_NAME'),
        )

        self._syncano = syncano_connection
        return self._syncano


class PaginationMixin(object):

    @classmethod
    def get_limit_and_skip(cls):

        return PARSE_PAGINATION_LIMIT, 0