# Path: zenpy/lib/util.py
# def as_plural(result_key):
#     """
#     Given a result key, return in the plural form.
#     """
#     # Not at all guaranteed to work in all cases...
#     if result_key.endswith('y'):
#         return re.sub("y$", "ies", result_key)
#     elif result_key.endswith('address'):
#         return result_key + 'es'
#     elif result_key.endswith('us'):
#         return re.sub("us$", "uses", result_key)
#     elif not result_key.endswith('s'):
#         return result_key + 's'
#     else:
#         return result_key
# 
# Path: zenpy/lib/exception.py
# class SearchResponseLimitExceeded(APIException):
#     """
#     A ``SearchResponseLimitExceeded`` is raised when a search has too many results
# 
#     See https://develop.zendesk.com/hc/en-us/articles/360022563994--BREAKING-New-Search-API-Result-Limits
#     """


import re
import six
import logging
from abc import abstractmethod
from datetime import datetime, timedelta
from zenpy.lib.util import as_plural
from zenpy.lib.exception import SearchResponseLimitExceeded
    from collections.abc import Iterable
    from collections import Iterable
from math import ceil
from __future__ import division



try:
except ImportError:


__author__ = 'facetoe'



# Path: zenpy/lib/util.py
# def as_plural(result_key):
#     """
#     Given a result key, return in the plural form.
#     """
#     # Not at all guaranteed to work in all cases...
#     if result_key.endswith('y'):
#         return re.sub("y$", "ies", result_key)
#     elif result_key.endswith('address'):
#         return result_key + 'es'
#     elif result_key.endswith('us'):
#         return re.sub("us$", "uses", result_key)
#     elif not result_key.endswith('s'):
#         return result_key + 's'
#     else:
#         return result_key
# 
# Path: zenpy/lib/exception.py
# class SearchResponseLimitExceeded(APIException):
#     """
#     A ``SearchResponseLimitExceeded`` is raised when a search has too many results
# 
#     See https://develop.zendesk.com/hc/en-us/articles/360022563994--BREAKING-New-Search-API-Result-Limits
#     """


# Path: zenpy/lib/generator.py
import re
import six
import logging
from abc import abstractmethod
from datetime import datetime, timedelta
from zenpy.lib.util import as_plural
from zenpy.lib.exception import SearchResponseLimitExceeded
    from collections.abc import Iterable
    from collections import Iterable
from math import ceil

from __future__ import division



try:
except ImportError:


__author__ = 'facetoe'



log = logging.getLogger(__name__)