Implemented galleries API.