syncthing-hs-0.3.0.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

System Services

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.

insync :: MonadSync m => SyncM m Bool Source

Determine whether the config is in sync.

connections :: MonadSync m => SyncM m Connections Source

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

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.

sysStatus :: MonadSync m => SyncM m System Source

Returns information about current system status and resource usage.

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.

Database Services

browse 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.

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

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

file :: MonadSync m => FolderName -> Path -> SyncM m DBFile Source

Returns most data available about a given file, including version and availability.

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

Fetch the ignores list.

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.

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

Get information about the current status of a folder.

Statistics Services

devices :: MonadSync m => SyncM m (Map Device DeviceInfo) Source

Returns general statistics about devices.

folders :: MonadSync m => SyncM m (Map FolderName FolderInfo) Source

Returns general statistics about folders.

Miscellaneous Services

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.

lang :: MonadSync m => SyncM m [Text] Source

Returns a list of canonicalized localization codes, as picked up from the Accept-Language header sent by the browser.

report :: MonadSync m => SyncM m UsageReport Source

Returns the data sent in the anonymous usage report.