main :: IO ()
main = do
  hSetBuffering stdout NoBuffering

  T.putStr "Input search query: "
  query <- T.getLine

  res <- runEitherT $ do
    auth <- runAuth

    searchResult <- runQuery auth $ QueryString query

    liftIO $ showInfo searchResult

  either showError (const $ return ExitSuccess) res >>= exitWith
main :: IO ()
main = do
  hSetBuffering stdout NoBuffering

  T.putStr "Input search query: "
  query <- T.getLine

  res <- runEitherT $ do
    auth <- runAuth

    searchResult <- runQuery auth $ QueryString query

    liftIO $ showInfo searchResult

  either showError (const $ return ExitSuccess) res >>= exitWith
main = do
  hSetBuffering stdout NoBuffering

  T.putStr "Input search query: "
  query <- T.getLine

  res <- runEitherT $ do
    auth <- runAuth

    searchResult <- runQuery auth $ QueryString query

    liftIO $ showInfo searchResult

  either showError (const $ return ExitSuccess) res >>= exitWith