 liftIO $ putStrLn "- 3. -----------------------------"
  itemList3 <- liftIO $ getTagItemsWithPage (pagenation items2 !! 0)
  let items3 = fst itemList3
  liftIO $ mapM_ print (list items3)
  liftIO $ mapM_ print (pagenation items3)

runUpdateItem :: IO ()
runUpdateItem = do
  putStrLn "ユーザ名を入力してEnter、次にパスワードを入力してEnterを押すこと！"
  input <- getContents
  lines <- return $ lines input

  let user = C8.pack $ lines !! 0
  let pass = C8.pack $ lines !! 1

  withAuthentication user pass
        (\err limit -> print err >> print limit) -- 認証エラー時の処理
       (\ctx -> evalStateT runUpdateItemCore ctx) -- 認証OK後の処理

runUpdateItemCore :: StateT QiitaContext IO ()
runUpdateItemCore = do
  let newItem = PostItem { post_item_title = "Qiita API on Haskell"
                         , post_item_body = "Qiita API on Haskell"

runGetTagItems :: StateT QiitaContext IO ()
runGetTagItems = do
  liftIO $ putStrLn ""
  liftIO $ putStrLn "- 1. -----------------------------"
  itemList1 <- liftIO $ getTagItemsFirstPage "Haskell"
  let items1 = fst itemList1
  liftIO $ mapM_ print (list items1)
  liftIO $ mapM_ print (pagenation items1)

  liftIO $ putStrLn ""
  liftIO $ putStrLn "- 2. -----------------------------"
  itemList2 <- liftIO $ getTagItemsFirstPage' "Haskell" 10
  let items2 = fst itemList2
  liftIO $ mapM_ print (list items2)
  liftIO $ mapM_ print (pagenation items2)

  liftIO $ putStrLn ""
  liftIO $ putStrLn "- 3. -----------------------------"
  itemList3 <- liftIO $ getTagItemsWithPage (pagenation items2 !! 0)
  let items3 = fst itemList3
  liftIO $ mapM_ print (list items3)
  liftIO $ mapM_ print (pagenation items3)
runGetTagItems = do
  liftIO $ putStrLn ""
  liftIO $ putStrLn "- 1. -----------------------------"
  itemList1 <- liftIO $ getTagItemsFirstPage "Haskell"
  let items1 = fst itemList1
  liftIO $ mapM_ print (list items1)
  liftIO $ mapM_ print (pagenation items1)

  liftIO $ putStrLn ""
  liftIO $ putStrLn "- 2. -----------------------------"
  itemList2 <- liftIO $ getTagItemsFirstPage' "Haskell" 10
  let items2 = fst itemList2
  liftIO $ mapM_ print (list items2)
  liftIO $ mapM_ print (pagenation items2)

  liftIO $ putStrLn ""
  liftIO $ putStrLn "- 3. -----------------------------"
  itemList3 <- liftIO $ getTagItemsWithPage (pagenation items2 !! 0)
  let items3 = fst itemList3
  liftIO $ mapM_ print (list items3)
  liftIO $ mapM_ print (pagenation items3)