-- |
  Module       :   Network .  . Api . Pin
  Copyright    :     2016 - 2021
-- License     :  Apache-2.0
--
-- Maintainer  :  
-- Stability   :  experimental
-- Portability :  unknown
--
-- Api calls with `pin` prefix.
--

module Network.Ipfs.Api.Pin where

import           Control.Monad.IO.Class         (MonadIO)
import           Data.Text                      (Text)

import           Network.Ipfs.Api.Internal      (_pinAdd, _pinRemove)
import           Network.Ipfs.Api.Internal.Call (call)
import           Network.Ipfs.Api.Types         (PinObj)
import           Network.Ipfs.Client            (IpfsT)

-- | Pin objects to local storage.
add :: MonadIO m => Text -> IpfsT m PinObj
add = call . _pinAdd

-- | Remove pinned objects from local storage.
remove :: MonadIO m => Text -> IpfsT m PinObj
remove = call . _pinRemove

 |
 License     :  Apache-2.0

 Maintainer  :  
 Stability   :  experimental
 Portability :  unknown

 Api calls with `pin` prefix.

 | Pin objects to local storage.
 | Remove pinned objects from local storage.
  Module       :   Network .  . Api . Pin
  Copyright    :     2016 - 2021

module Network.Ipfs.Api.Pin where

import           Control.Monad.IO.Class         (MonadIO)
import           Data.Text                      (Text)

import           Network.Ipfs.Api.Internal      (_pinAdd, _pinRemove)
import           Network.Ipfs.Api.Internal.Call (call)
import           Network.Ipfs.Api.Types         (PinObj)
import           Network.Ipfs.Client            (IpfsT)

add :: MonadIO m => Text -> IpfsT m PinObj
add = call . _pinAdd

remove :: MonadIO m => Text -> IpfsT m PinObj
remove = call . _pinRemove
