'Gets a EndpointRateLimit object for the given url.
Args:
url (str, optional):
URL of the endpoint for which to return the rate limit
status.
Returns:
namedtuple: EndpointRateLimit object containing rate limit
information.'

def get_limit(self, url):

    endpoint = self.url_to_resource(url)
    resource_family = endpoint.split('/')[1]
    try:
        family_rates = self.resources.get(resource_family).get(endpoint)
    except AttributeError:
        return EndpointRateLimit(limit=15, remaining=15, reset=0)
    if (not family_rates):
        self.set_unknown_limit(url, limit=15, remaining=15, reset=0)
        return EndpointRateLimit(limit=15, remaining=15, reset=0)
    return EndpointRateLimit(family_rates['limit'], family_rates['remaining'], family_rates['reset'])
