Example #1
0
    def mv_request(self):
        """Get Property: Logger
        """
        if self.__mv_request is None:
            self.__mv_request = RequestMvIntegrationDownload(
                logger_format=self.logger_format,
                logger_level=self.logger_level,
            )

        return self.__mv_request
Example #2
0
#  @copyright 2018 TUNE, Inc. (http://www.tune.com)

import logging

from pprintpp import pprint
from requests_mv_integrations import (
    RequestMvIntegrationDownload, )
from requests_mv_integrations.support import (HEADER_CONTENT_TYPE_APP_JSON)
from logging_mv_integrations import (LoggingFormat, LoggingOutput)

URL_TUNE_MAT_API_COUNTRIES = \
    'https://api.mobileapptracking.com/v2/countries/find.json'

request_download = RequestMvIntegrationDownload(
    logger_level=logging.DEBUG,
    logger_output=LoggingOutput.FILE,
    logger_format=LoggingFormat.JSON,
)

request_download.logger.note(request_download.logger.getLevelName().lower())
request_download.logger.info("Start".upper())

result = \
    request_download.request(
        request_method='GET',
        request_url=URL_TUNE_MAT_API_COUNTRIES,
        request_params=None,
        request_retry=None,
        request_headers=HEADER_CONTENT_TYPE_APP_JSON,
        request_label="TMC Countries"
    )
Example #3
0
from pprintpp import pprint
from requests_mv_integrations import (
    RequestMvIntegrationDownload,
    __version__,
)
from requests_mv_integrations.support import (HEADER_CONTENT_TYPE_APP_JSON)
from logging_mv_integrations import (
    TuneLogging,
    TuneLoggingFormat,
)

URL_TUNE_MAT_API_COUNTRIES = \
    'https://api.mobileapptracking.com/v2/countries/find.json'

tune_requests_mv_intgs = RequestMvIntegrationDownload(
    logger_level=logging.DEBUG)

log = TuneLogging(logger_name=__name__.split('.')[0],
                  logger_version=__version__,
                  logger_level=logging.DEBUG,
                  logger_format=TuneLoggingFormat.JSON)

log.info("Start")

result = \
    tune_requests_mv_intgs.request(
        request_method='GET',
        request_url=URL_TUNE_MAT_API_COUNTRIES,
        request_params=None,
        request_retry=None,
        request_headers=HEADER_CONTENT_TYPE_APP_JSON,
Example #4
0
def request_mv_integration_download_object():
    obj = RequestMvIntegrationDownload()
    return obj