@classmethod
def from_headers(cls, headers):
    """Create RateLimitsInfo from HTTP headers."""
    try:
        data = {'interval': headers['X-RateLimit-Interval'], 'limit':
            headers['X-RateLimit-Limit'], 'remaining': headers[
            'X-RateLimit-Remaining'], 'reset': headers['X-RateLimit-Reset']}
    except KeyError:
        data = {}
    return cls.from_dict(data)
