module MetMuseum
Constants
- API_ENDPOINT
- ApiError
- BadRequestError
- DEPARTMENTS_URI
- ForbiddenError
- HTTP_BAD_REQUEST_CODE
- HTTP_FORBIDDEN_CODE
- HTTP_NOT_FOUND_CODE
- HTTP_OK_CODE
- HTTP_UNAUTHORIZED_CODE
- HTTP_UNPROCESSABLE_ENTITY_CODE
- MetMuseumError
- NotFoundError
- PUBLIC_URI
- SEARCH_URI
- TypeError
- UnprocessableEntityError
- VERSION
Public Class Methods
error_class(response)
click to toggle source
# File lib/met_museum/http_status_code.rb, line 9 def self.error_class(response) case response.status when HTTP_BAD_REQUEST_CODE BadRequestError when HTTP_UNAUTHORIZED_CODE UnauthorizedError when HTTP_FORBIDDEN_CODE ForbiddenError when HTTP_NOT_FOUND_CODE NotFoundError when HTTP_UNPROCESSABLE_ENTITY_CODE UnprocessableEntityError else ApiError end end