Esempio n. 1
0
async def async_check_update(code, max_retries=3):
    api_type = check_type(code)
    if api_type is trackingmore:
        return trackingmore.get(code, max_retries)
    elif api_type is correios:
        return await correios.async_get(code, max_retries)
    else:
        return status.TYPO
Esempio n. 2
0
def check_update(code, max_retries=3):
    api_type = check_type(code)
    if api_type is trackingmore:
        return trackingmore.get(code, max_retries)
    elif api_type is correios:
        return correios.get(code, 1)
    else:
        return status.TYPO