syncthing-hs-0.1.2.0: Haskell bindings for the Syncthing REST API

Copyright(c) 2014 Jens Thomas
LicenseBSD-style
Maintainerjetho@gmx.de
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010
Extensions
  • OverloadedStrings
  • TupleSections

Network.Syncthing.Get

Contents

Description

Syncthing GET requests.

Synopsis

Request functions

ping :: MonadSync m => SyncM m Text Source

Ping the Syncthing server. Returns the string "pong".

apiKey :: MonadSync m => SyncM m (Maybe Text) Source

Get the API Key if available.

config :: MonadSync m => SyncM m Config Source

Return the current configuration.

completion :: MonadSync m => Device -> FolderName -> SyncM m Int Source

Return the completion percentage (0 to 100) for a given device and folder.

connections :: MonadSync m => SyncM m (Map Device Connection) Source

Get the list of current connections and some metadata associated with the connection/peer.

deviceId :: MonadSync m => Device -> SyncM m Device Source

Verifiy and format a device ID. Return either a valid device ID in modern format, or an error.

discovery :: MonadSync m => SyncM m (Map Device [CacheEntry]) Source

Fetch the contents of the local discovery cache.

errors :: MonadSync m => SyncM m [Error] Source

Get the list of recent errors.

ignores :: MonadSync m => FolderName -> SyncM m Ignore Source

Fetch the ignores list.

model :: MonadSync m => FolderName -> SyncM m Model Source

Get information about the current status of a folder.

need :: MonadSync m => FolderName -> SyncM m Need Source

Get lists of files which are needed by this device in order for it to become in sync.

report :: MonadSync m => SyncM m UsageReport Source

Returns the data sent in the anonymous usage report.

sync :: MonadSync m => SyncM m Bool Source

Determine whether the config is in sync.

system :: MonadSync m => SyncM m System Source

Returns information about current system status and resource usage.

tree Source

Arguments

:: MonadSync m 
=> FolderName

root folder

-> Maybe Path

defines a prefix within the tree where to start building the structure

-> Maybe Int

defines how deep within the tree we want to dwell down (0 based, defaults to unlimited depth)

-> SyncM m (Maybe DirTree) 

Get the directory tree of the global model.

upgrade :: MonadSync m => SyncM m Upgrade Source

Check for a possible upgrade.

version :: MonadSync m => SyncM m Version Source

Get the current syncthing version information.