C# Class SyncthingRestClient.RestClient

显示文件 Open project: kreischweide/metrothing Class Usage Examples

Public Methods

Method Description
FormatDeviceIdentifier ( string deviceId ) : string
GetConfig ( ) : GetConfigResponse
GetConfigAsync ( CancellationToken token ) : Task
GetConnectionsAsync ( CancellationToken token ) : Task
GetConnetions ( ) : GetConnetionResponse
GetFolderModel ( string folderId ) : GetFolderModelResponse
GetFolderModelAsync ( string folderId, CancellationToken token ) : Task
GetFolderStats ( ) : GetFolderStatsResponse
GetFolderStatsAsync ( CancellationToken token ) : Task
GetNeed ( string folderId ) : GetNeedResponse
GetNeedAsync ( string folderId, CancellationToken token ) : Task
GetPing ( ) : GetPingResponse
GetPingAsync ( CancellationToken token ) : Task
GetReport ( ) : GetReportResponse
GetReportAsync ( CancellationToken token ) : Task
GetSystemStatus ( ) : GetSystemResponse
GetSystemStatusAsync ( CancellationToken token ) : Task
GetUpgradeStatus ( ) : GetUpgradeResponse
GetUpgradeStatusAsync ( CancellationToken token ) : Task
GetVersion ( ) : GetVersionResponse
GetVersionAsync ( CancellationToken token ) : Task
PostBump ( string folderId, string fileId ) : PostBumpResponse
PostBumpAsync ( string folderId, string fileId, CancellationToken token ) : Task
PostPing ( ) : PostPingResponse
PostPingAsync ( CancellationToken token ) : Task
PostRescan ( string folderId ) : PostRescanResponse
PostRescanAsync ( string folderId, CancellationToken token ) : Task
RestClient ( string host, UInt16 port, bool useHttps, string apiKey ) : System
Restart ( ) : PostRestartResponse
RestartAsync ( CancellationToken token ) : Task
Shutdown ( ) : PostShutdownResponse
Upgrade ( ) : PostUpgradeResponse
UpgradeAsync ( CancellationToken token ) : Task
VerifyDeviceIdentifier ( string deviceId ) : bool

Private Methods

Method Description
GetBaseRequest ( string resource, Method method = Method.GET ) : IRestRequest
GetRestClient ( ) : RestSharp.RestClient
HandleRestErrors ( IRestResponse response ) : void

Method Details

FormatDeviceIdentifier() public method

public FormatDeviceIdentifier ( string deviceId ) : string
deviceId string
return string

GetConfig() public method

public GetConfig ( ) : GetConfigResponse
return GetConfigResponse

GetConfigAsync() public method

public GetConfigAsync ( CancellationToken token ) : Task
token System.Threading.CancellationToken
return Task

GetConnectionsAsync() public method

public GetConnectionsAsync ( CancellationToken token ) : Task
token System.Threading.CancellationToken
return Task

GetConnetions() public method

public GetConnetions ( ) : GetConnetionResponse
return SyncthingRestClient.Response.GetConnetionResponse

GetFolderModel() public method

public GetFolderModel ( string folderId ) : GetFolderModelResponse
folderId string
return SyncthingRestClient.Response.GetFolderModelResponse

GetFolderModelAsync() public method

public GetFolderModelAsync ( string folderId, CancellationToken token ) : Task
folderId string
token System.Threading.CancellationToken
return Task

GetFolderStats() public method

public GetFolderStats ( ) : GetFolderStatsResponse
return SyncthingRestClient.Response.GetFolderStatsResponse

GetFolderStatsAsync() public method

public GetFolderStatsAsync ( CancellationToken token ) : Task
token System.Threading.CancellationToken
return Task

GetNeed() public method

public GetNeed ( string folderId ) : GetNeedResponse
folderId string
return SyncthingRestClient.Response.GetNeedResponse

GetNeedAsync() public method

public GetNeedAsync ( string folderId, CancellationToken token ) : Task
folderId string
token System.Threading.CancellationToken
return Task

GetPing() public method

public GetPing ( ) : GetPingResponse
return SyncthingRestClient.Response.GetPingResponse

GetPingAsync() public method

public GetPingAsync ( CancellationToken token ) : Task
token System.Threading.CancellationToken
return Task

GetReport() public method

public GetReport ( ) : GetReportResponse
return SyncthingRestClient.Response.GetReportResponse

GetReportAsync() public method

public GetReportAsync ( CancellationToken token ) : Task
token System.Threading.CancellationToken
return Task

GetSystemStatus() public method

public GetSystemStatus ( ) : GetSystemResponse
return SyncthingRestClient.Response.GetSystemResponse

GetSystemStatusAsync() public method

public GetSystemStatusAsync ( CancellationToken token ) : Task
token System.Threading.CancellationToken
return Task

GetUpgradeStatus() public method

public GetUpgradeStatus ( ) : GetUpgradeResponse
return SyncthingRestClient.Response.GetUpgradeResponse

GetUpgradeStatusAsync() public method

public GetUpgradeStatusAsync ( CancellationToken token ) : Task
token System.Threading.CancellationToken
return Task

GetVersion() public method

public GetVersion ( ) : GetVersionResponse
return SyncthingRestClient.Response.GetVersionResponse

GetVersionAsync() public method

public GetVersionAsync ( CancellationToken token ) : Task
token System.Threading.CancellationToken
return Task

PostBump() public method

public PostBump ( string folderId, string fileId ) : PostBumpResponse
folderId string
fileId string
return PostBumpResponse

PostBumpAsync() public method

public PostBumpAsync ( string folderId, string fileId, CancellationToken token ) : Task
folderId string
fileId string
token System.Threading.CancellationToken
return Task

PostPing() public method

public PostPing ( ) : PostPingResponse
return PostPingResponse

PostPingAsync() public method

public PostPingAsync ( CancellationToken token ) : Task
token System.Threading.CancellationToken
return Task

PostRescan() public method

public PostRescan ( string folderId ) : PostRescanResponse
folderId string
return PostRescanResponse

PostRescanAsync() public method

public PostRescanAsync ( string folderId, CancellationToken token ) : Task
folderId string
token System.Threading.CancellationToken
return Task

RestClient() public method

public RestClient ( string host, UInt16 port, bool useHttps, string apiKey ) : System
host string
port System.UInt16
useHttps bool
apiKey string
return System

Restart() public method

public Restart ( ) : PostRestartResponse
return PostRestartResponse

RestartAsync() public method

public RestartAsync ( CancellationToken token ) : Task
token System.Threading.CancellationToken
return Task

Shutdown() public method

public Shutdown ( ) : PostShutdownResponse
return PostShutdownResponse

Upgrade() public method

public Upgrade ( ) : PostUpgradeResponse
return PostUpgradeResponse

UpgradeAsync() public method

public UpgradeAsync ( CancellationToken token ) : Task
token System.Threading.CancellationToken
return Task

VerifyDeviceIdentifier() public method

public VerifyDeviceIdentifier ( string deviceId ) : bool
deviceId string
return bool