-- |
-- Module      :  Network.Ipfs.Api.Stats
-- Copyright   :  Aleksandr Krupenkin 2016-2021
-- License     :  Apache-2.0
--
-- Maintainer  :  mail@akru.me
-- Stability   :  experimental
-- Portability :  unknown
--
-- Api calls with `stats` prefix.
--

module Network.Ipfs.Api.Stats where

import           Control.Monad.IO.Class         (MonadIO)

import           Network.Ipfs.Api.Internal      (_statsBw, _statsRepo)
import           Network.Ipfs.Api.Internal.Call (call)
import           Network.Ipfs.Api.Types         (StatsBwObj, StatsRepoObj)
import           Network.Ipfs.Client            (IpfsT)

-- | IPFS bandwidth information.
bw :: MonadIO m => IpfsT m StatsBwObj
bw :: IpfsT m StatsBwObj
bw = ClientM StatsBwObj -> IpfsT m StatsBwObj
forall (m :: * -> *) a. MonadIO m => ClientM a -> IpfsT m a
call ClientM StatsBwObj
_statsBw

-- | Get stats for the currently used repo.
repo :: MonadIO m => IpfsT m StatsRepoObj
repo :: IpfsT m StatsRepoObj
repo = ClientM StatsRepoObj -> IpfsT m StatsRepoObj
forall (m :: * -> *) a. MonadIO m => ClientM a -> IpfsT m a
call ClientM StatsRepoObj
_statsRepo