getPostIds tid = do
    r <- fmap (^. responseBody) . get . url $ topic tid

    let mpids = do
            json <- decode r

            flip parseMaybe json $ \obj -> do
                (pstream :: Object) <- obj .: "post_stream"
                (stream :: Array) <- pstream .: "stream"

                let f :: Value -> Int
                    f = fromJust . parseMaybe id . parseJSON

                return $ V.map f stream

        pids = maybe V.empty id mpids

    return pids
getPostIds tid = do
    r <- fmap (^. responseBody) . get . url $ topic tid

    let mpids = do
            json <- decode r

            flip parseMaybe json $ \obj -> do
                (pstream :: Object) <- obj .: "post_stream"
                (stream :: Array) <- pstream .: "stream"

                let f :: Value -> Int
                    f = fromJust . parseMaybe id . parseJSON

                return $ V.map f stream

        pids = maybe V.empty id mpids

    return pids
getPostIds tid = do
    r <- fmap (^. responseBody) . get . url $ topic tid

    let mpids = do
            json <- decode r

            flip parseMaybe json $ \obj -> do
                (pstream :: Object) <- obj .: "post_stream"
                (stream :: Array) <- pstream .: "stream"

                let f :: Value -> Int
                    f = fromJust . parseMaybe id . parseJSON

                return $ V.map f stream

        pids = maybe V.empty id mpids

    return pids