import logging


def get_publications(service, spreadsheetId):
  """Gets publications from gSheet."""
  range_name = 'publications!A:AZ'
  results = service.spreadsheets().values().get(
      spreadsheetId=spreadsheetId, range=range_name).execute()
  values = results.get('values', [])
  if not values:
    logging.error('No publication found in gSheets.')
    exit(1)
  return values